How to give invincibility for 5 seconds after colliding with an actor?
madisonn
Member Posts: 24
In my game, when the player overlaps or collides with the enemy it is destroyed. When the player overlaps or collides with the coins, I want the player to be invincible for 5 seconds, so if it collides with the enemy it won't be destroyed for that period of time.
I can't figure out how to do this because no matter what I try, the player always gets destroyed even after colliding with the coins!
Thanks for any help!
I can't figure out how to do this because no matter what I try, the player always gets destroyed even after colliding with the coins!
Thanks for any help!
Comments
In the enemy add a rule, if Invincible is false, (do stuff to kill actor)
In the coin create a rule, when overlap or collide with player, change attribute Invincible to true.
After 5 seconds change attribute Imvincible to false.
Need Help? Email Me | Templates | Full Game Source Code