I want that all the scripts of action stop and make the one that makes that if life reaches 0, switch costumes. The problem is that when life reaches 0, if im pressing a button that performs an action, it continues doing it until it games over or i stop pressing it. Can you help me with that? Thank you!
Offline
when gf clicked forever if <(life)=[0]> broadcast [end] end end
When I recieve [end] stop all When gf clicked forever if <(mouse-pointer down)> repeat until <(not (mouse-pointer down))> do action end end
Last edited by K-Jam (2012-04-14 22:52:26)
Offline
Maybe have a variable that's set to "yes" when flag is clicked and then when lives reach 0 set it to "no". Then put all the action into
if <(variable) = [yes]> action end
Last edited by aryabtsev (2012-04-14 23:48:30)
Offline
Make a script that says, when life equals zero, change to whatever costume you were wanting, broadcast end game and wait, stop all. On your other sprites, have a script that says, when I recieve end game, hide. For an example, download the Tanks project in my signature below. It has this type of scripting.
Offline
Instead of using forever blocks use:
repeat until <(lives) = [0]> do whatever end death action //you will only need the death action on [b]one script[/b].
K-Jam wrote:
when gf clicked forever if <(life)=[0]> broadcast [end] end endWhen I recieve [end] stop all When gf clicked forever if <(mouse-pointer down)> repeat until <(not (mouse-pointer down))> do action end end
If you're doing that the broadcast is unnecessary.
when gf clicked forever if <(life)=[0]> stop all
Last edited by Splodgey (2012-04-15 06:21:57)
Offline