SolidBanana117
This is minecraftcrazy1998 who needs your help. Could you help me with making health for my zombie game because when i do it, it glitches.
Offline
I think you need to explain a little more of what your game is like. What you can do is when a zombie attacks you, you change te costume of your health bar sprite which would lower it. This script could go in the health bar.
Then make a script like this:When I receivei just got hurtNext costume
I'm not sure if this would work. I don't know if you can make it so if costume 1 = 1.Whenclicked
Wait untilcostume #=1ofhealth bar1Stop all
Last edited by turkey3 (2012-03-16 20:15:06)
Offline
turkey3 wrote:
I think you need to explain a little more of what your game is like. What you can do is when a zombie attacks you, you change te costume of your health bar sprite which would lower it. This script could go in the health bar.
Then make a script like this:When I receivei just got hurt ▼Next costumeI'm not sure if this would work. I don't know if you can make it so if costume 1 = 1.Whenclicked
Wait until=costume # ▼ofhealth bar ▼1Stop all
Fixed it a bit
Offline
you could make a variable, sorta like: [health (5)] then do like: when I receive: Ouchies I got a boo boo!!!!!! (AKA: OMG a zombies biting me!), change [ouchies I got a boo boo!] by (-1).
Offline
If you want to make health and death happen when health=0, try these following scripts:
That's just to reset the zombie's life every time. then do:whenclicked
sethealthto5
this will make it so that the zombie will lose health whenever it gets hit. then do this:when I receivezombie hitchangehealthby-1
this wiull make the zombie die when it loses all health.whenclicked
forever ifhealth=0brodcastzombie dead
Offline