Tap an Actor/Enemy to shoot it?
MLCinema
Member Posts: 133
Hello All,
Are there any tutorials for tapping to shoot/destroy an actor. And how many times to tap to destroy. I would like to tap an actor to shoot it. Like - http://itunes.apple.com/us/app/annies-wild-shot-lite/id323213475?mt=8
Thank you all.
Are there any tutorials for tapping to shoot/destroy an actor. And how many times to tap to destroy. I would like to tap an actor to shoot it. Like - http://itunes.apple.com/us/app/annies-wild-shot-lite/id323213475?mt=8
Thank you all.
Comments
Rule:
If touch is pressed
Behaviour:
Destroy Actor
If you want to give your actor 'lives', make a variable (look at the actor's attributes on the left hand side, under its image).
There should be a + and - sign at the bottom. Press the '+' sign and a new variable should appear above it.
Click this new variable and name it 'lives'. Set it to 3 (or whatever)
Then in your actor, instead of the original rules, have the following:
Rule:
If touch is pressed
Behaviour:
Change attribute self.lives to self.lives -1
Then a new rule:
If attribute self.lives is equal or less than 0
Behaviour
Destroy actor
That should do it. Hope it helps!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Always good to look in the yellow stickies at the demo demo demo thread