lose life problem.
tollhousestudio
Member Posts: 166
I have a game where if you land on a certain part of the level, you lose a life.
This works fine but because the actor bounces, which I want to happen, you lose 2 or more lifes each time.
How would I make it that I only lose one life.
This works fine but because the actor bounces, which I want to happen, you lose 2 or more lifes each time.
How would I make it that I only lose one life.
Comments
Hope this helps!
Only lose a life if invincible is false.
Whenever your character loses a life, set invincible to true.
Then start a timer for a second or two (or however long you want), which sets invincible back to false.
At this time you could also do something graphically that shows the character is invincible like a glowing shield, or set its alpha to 50%, something like that. That same timer would reverse this as well when it ends.