i've been makeing a progect call zombie run and i've put health on as a variable but i dont know how to make my guy die plz help me
Offline
fg123 wrote:
Yup. And for him to lose health, use:
When Green Flag Clicked Forever if touching what ever kills him
change health by -1 (it an be any number, depending on how much health you want him to lose )
wait 0.1 secs
Unless you give him a ton of health, 0.1 seconds seems a bit fast don't you think?
I would do this:
Make a variable called health.
<when green flag clicked>
<set{ health }to( 100
Suppose you make the zombies green. Then you insert on your guy:
<when green flag clicked>
<forever if><touching color[ whatever color the zombies are
<wait( .2 )secsc>
<change{ health }by( -1
<end>
Then:
<when green flag clicked>
<wait until><( health <=> 0 )>
<broadcast[ Die
<when I receive[ Die
<stop all>
Last edited by steppenwulf (2009-10-27 20:39:04)
Offline
Whoops my bad. Thanks for noticing, urhungry.
Offline