IGM Tutorial: Adding Health

in Tutorials

Want to check out a PDF of this tutorial? Right click save as HERE.

If you’ve been following along with the tutorials this far you can load up the platforming game we’ve been working on and we’ll get started.

Let’s start by creating a boss penguin from our regular penguins. That way we can have a boss’s health displayed on the screen while we fight him. Head over to the “Animations” sub-tab and create a copy of our Penguin animations. Rename the copy Boss Penguin so it’s a little easier to keep track. Under the “Per Frame Settings” sub-sub-tab change both of the Scale options to 2. This will double the size of our penguin. Now adjust your hit detection accordingly.

Collision Detection with Other Gadgets
Horizontal Positioning % (top left box) = 75
Horizontal Size % (top right box) = 50
Vertical Positioning % (bottom left box) = 50
Vertical Size % (bottom right box) = 12

Collision Detection with Walls (Tiles)
Horizontal Position % = 75
Horizontal Size % = 50
Vertical POsitioning % = 175
Vertical Size % = 25

Next up, we need to make it so our Player can do some damage to this boss. Head to the Player’s Jumping animation. Turn the “Collision Detection For Attacks” on and use these settings for both directions of jumping.

Collision Detection For Attacks
Horizontal Positioning % (top left box) = 12
Horizontal Size % (top right box) = 75
Vertical Positioning % (bottom left box) = 100
Vertical Size % (bottom right box) = 12

This will give you a small line of damage underneath your Player so that he can only hurt things when he jumps on them. Now head to the “Gadgets” sub-tab and create a copy of our Penguin gadget. Go ahead and rename this Boss Penguin too. Under the “Emergence Settings” sub-sub-tab you can change the “Assigned Animations” to Boss Penguin. While you’re here go ahead and change this gadget’s health from 1 to 3.

Switch back to the “Registering Actions” sub-sub-tab. When you get here you’ll want to fix all of the drop-down menus under “Action To Be Assigned” because when we changed the assigned animation for this copied gadget it blanked out all of the fields regarding the used animations. Now create copies of the Walking Left and Right “Action Programs”. Rename them to Attacked Left and Right. Set these both up so that they use the memory for forcing the player to jump, just like we did with the regular penguins. Now set Attacked Left and Right so that they go back to their respective walking directions with an Apply Ratio of 100%. They should not go to any other actions. Now set Walking Left and Right to go to Attacked Left and Right when stepped on, and Dying Left and Right when Gadget’s Health Reaches Zero.

Now switch to the Penguin Gadget and head to the “Emergence Settings” sub-sub-tab and check the box for “Don’t Flash On Taking Damage”. Put your penguin boss on a canvas somewhere (mind your layers, I put mine on Layer 3 on the new canvas we created in the last tutorial). When you attack the other penguins they respond exactly as they did before regardless of your new attacking collision detection, and when you encounter your boss penguin he can be defeated with three jumps on the head. You should bounce off of him each time, and you should only be able to damage him by jumping on him.

Ready to start your own game in IGM? Purchase IGM at a 10% discount using the coupon code igmakerohyeah. Any questions, comments? Ask them in the comment section below.

2 comments… add one

Leave a Comment