Hi, I am making a game called 'Stick Wars' so I need health variables.
The variable is working fine, but when the health reaches 0 I don't know how to make the my character die though (I know how to make the character die but not with variables)
Please help me!
Offline
When I Receive[game begins] set [health] to (5) wait until <(health) = [0]> die
Offline
MoreGamesNow wrote:
When I Receive[game begins v] set [health] to (5) wait until <(health) = [0]> die
Yes, but it should be:
When I Receive[game begins v] set [health] to (5) wait until <(health) < [1]> dieBecause health might become negative one.
Last edited by ImagineIt (2012-03-03 12:28:42)
Offline
MoreGamesNow wrote:
When I Receive[game begins] set [health] to (5) wait until <(health) = [0]> stop script
Offline
Thanks for help
Offline
joletole wrote:
MoreGamesNow wrote:
When I Receive[game begins] set [health] to (5) wait until <(health) = [0]> stop script
No, because that will only stop that script. I think you mean to replace this:
stop scriptwith this:
stop all
Offline
Greenatic wrote:
joletole wrote:
MoreGamesNow wrote:
When I Receive[game begins] set [health] to (5) wait until <(health) = [0]> stop scriptNo, because that will only stop that script. I think you mean to replace this:
stop scriptwith this:stop all
I originally had a "die" block (basically, an abbreviation of whatever script he is going to use to kill the sprite. I'm not sure why joletole replaced it with "stop script".
Offline