Building a boss from scratch
Posted: Mon Aug 28, 2017 5:45 am
So I'm been playing around with LunaLua, and I've got a good amount of code down. There are some basic principles I need to figure out:
1. I need to spawn a block (anything -- lava, ground, etc.), but more importantly, I need to be able to DESPAWN that specific block. I've looked up codes for spawning objects, but every time I try to despawn it, it doesn't work, so help with this would be appreciated. Would I have to attach something to a spawned block to make it despawn, or could I despawn every single block of the same type with a single code?
2. I need to spawn a NEW block that has no hit detection and cannot damage the player. I could repurpose a background object for this if it's too risky to create something completely new. When Mario/Luigi hits this block with a hammer, it has to decrease a variable down by one. The specific hammer can only damage the boss one time, and after it does damage, it despawns.
3. I need to be able to change the X and Y coordinates of both of these blocks either through manual input or through speed modification. Such as, if A = 1, this object is now at this position; if A = 2, it's now here, and so on.
I'm actually not sure how complicated the coding would be for these, so if it's something not possible in LunaLua or requires a wall of coding, please let me know. Also, if there are some help pages somewhere that already cover some of these in-depth, please link me to them.
1. I need to spawn a block (anything -- lava, ground, etc.), but more importantly, I need to be able to DESPAWN that specific block. I've looked up codes for spawning objects, but every time I try to despawn it, it doesn't work, so help with this would be appreciated. Would I have to attach something to a spawned block to make it despawn, or could I despawn every single block of the same type with a single code?
2. I need to spawn a NEW block that has no hit detection and cannot damage the player. I could repurpose a background object for this if it's too risky to create something completely new. When Mario/Luigi hits this block with a hammer, it has to decrease a variable down by one. The specific hammer can only damage the boss one time, and after it does damage, it despawns.
3. I need to be able to change the X and Y coordinates of both of these blocks either through manual input or through speed modification. Such as, if A = 1, this object is now at this position; if A = 2, it's now here, and so on.
I'm actually not sure how complicated the coding would be for these, so if it's something not possible in LunaLua or requires a wall of coding, please let me know. Also, if there are some help pages somewhere that already cover some of these in-depth, please link me to them.