Ok, so far I have a pretty decent game for my first try. The black mage moves back and forth and shoots fireballs at monsters. I have three variables, Life, Mana, and Kills. They should all be self-explanatory. I can't figure out how to make the game end when Life hits zero or how to stop the monsters coming at 100 kills. Any help?
Offline
Somewhere you must be decrementing the Life variable. Right after you do that you can add a block that looks like this:
If Life=0
Stop All Scripts
You could do something similar after incrementing the kills variable.
Offline
For a long time, as a matter of habit, for situations like this I've used greater than (>) and less than (<). Often it does exactly the same thing as saying "= 0" or "= whatever the max is," but there are a few situations where > & < work better. For instance, imagine if the life was at 1, and before you got a chance to check it, 2 life was subtracted. Then you'd be at -1 life, and your sprite would have morphed into an undead zombie sprite. 8D
So this is what I'd say:
If life < 1
(do whatever happens at the end of the game)
One thing you could do is put this somewhere:
If life < 1
Broadcast DEAD!
And then you can write a "When I Receive Message DEAD!" on any sprite saying what that sprite does when the game ends.
I hope that helps!
<3
Offline