I need to know how to make an enemy take more than one hit before it dies. for an example, a big boss, takes, let’s say 5 hits to kill, I need to know how to do that. Here’s a link to my game: https://flowlab.io/game/view/998100
Search up health examples on the games page.
first have a collision and it collides with like bullets put a number saying -1 then connect it with another number like 10 this is the health and the negative number is the damage put a filter tell it less than 1 and i like to put a next level connected to it and when you kill it it brings you to the next level hope this helps
Hope this helps:
- Create Collision
- Collision Out to NUMBER In – Set This Number Number to -1 (referred to HIT NUMBER in this example).
- Out of “Hit Number” go to the + of another number (referred to as EnemyHealth Number in this example).
- Out of the EnemyHealth Number, Go into a Filter In
- Set the Filter Value to greater than 0
- Set Filter FAIL to go to a Destroyer
This will mean that each Collision will remove the Enemy’s health by 1 unit. As long as the enemy health is greater than 0 it will not matter, once it hits 0 the enemy is destroyed.
Additional Trick is to put another filter on it to check if the enemy is low (say 1 or 2 health units) and then run an animation to change the enemy’s color, play a sound or ??? to let the player know they are close to killing them.
thanks, everyone, but I ended up finding out.