i am making a game and i have a gameover sprite and i want that when health variable is zero it shows and then stops all
this is what i have and it does not work
when gf clicked forever if Health = 0 show stop all
Offline
that doesnt work if i even touch a zombie it shows it and stops all and p.s i just became a scratcher how do i get the thing under our text
Offline
This should work:
Your problem is that the sprite does not hide at the beginning and the health is not reset. Even if these do happen, they must within the script for it to work all the time. Also, if health changes greatly, you may not want it to check for a value equal to zero because it could become less than zero without actually becoming zero.
Last edited by skippito (2012-07-04 15:46:07)
Offline
skippito wrote:
This should work:
http://i46.tinypic.com/2mpk13d.gif
Your problem is that the sprite does not hide at the beginning and the health is not reset. Even if these do happen, they must within the script for it to work all the time. Also, if health changes greatly, you may not want it to check for a value equal to zero because it could become less than zero without actually becoming zero.
i did have it hidden and the health reset when flag clicked and your script did not work
Last edited by ZombieHappines (2012-07-04 15:51:30)
Offline
hello can anyone help me
Offline
Can you link the project to me, it could be that if you have a block like
when [space v] key pressedthat you don't need the green flag for it to work. You only can use Stop all for things that start with:
when flag clicked
Last edited by hdarken (2012-07-04 21:22:10)
Offline
hdarken wrote:
Can you link the project to me, it could be that if you have a block like
when [space v] key pressedthat you don't need the green flag for it to work. You only can use Stop all for things that start with:when flag clicked
ok so here is a link to an earlier version it does have the health bar but not the gamever screen http://scratch.mit.edu/projects/ZombieHappines/2652393
Last edited by ZombieHappines (2012-07-05 11:04:19)
Offline