How To Create Three Strikes You Are Out
Hammination
Member, PRO Posts: 4
in Tech Support
How do I add a behavior where after an actor collides with another actor five times, the game is over, it jumps to the game over screen?
Comments
First you need an attribute to track the strikes: Create an attribute like game.Strikes
Then you need to actually count the strikes. Create a rule that triggers on your strike condition and increments game.Strikes. To increment game.Strikes, use Change Attribute. The target should be game.Strikes and the value to set should be an expression: game.Strikes + 1
Finally you need a Rule that checks if you have enough strikes. Create a Rule that checks if game.Strikes >= 5
Inside that rule, use Change Scene to jump to the Game Over screen.
Hope that helps!