Hey! I have managed to make a health variable and made it work, but it doesn't stop at 0 or kill the enemy/ me. Any help?
Offline
Well first of all, could you show your scripts or upload your project? Until then, it'll be a bit hard to help you.
Offline
Try making a code (for your character) that says something like...
when gf clicked if <(health)=[0]> endIn this example your message will be restart.
broadcast [restart] stop script when i receive [restart]In this case your start screen is called b1.
when i receive [restart] change to background [b1]Say you have a creepy death scream for your primary character? Use that on the stage if primary character dies.
when i receive [restart] hide play sound [example freaky screech]Now for enemy death. Do the same thing except don't change backgrounds and use a diff sound. Maybe make it change to a pool of blood costume then a dot costume (dot of the smallest size on the painter, you can see one in this script when the guy and rock disappear -> http://scratch.mit.edu/projects/eveadelekitty/2963896 )
wait [1] secs
Offline
Oh nm, the guy doesn't disappear.
But go to the costume creator in the enemy's costume, make a new costume, use the smallest brush size and put one dot. ONLY ONE!!! Now take the dude and test run. If this doesn't work ask a better scratcher!
Offline
Eve, you forgot to wrap your first if in a forever loop. Lemme put it all in one script;
when gf clicked forever if <not <(health) > [0]>> set [health v] to [0] die script //Usually a hide block and a broadcast to end the game end
Offline