Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Trouble with zombie game.
- zorgo9
- Scratcher
2 posts
Trouble with zombie game.
I want the zombies to take away half a heart every time they touch you.
I've tried doing this:
On the zombie:
When flag clicked
Forever
If <touching sprite 1> then
Broadcast (ouch)
And on the hearts:
When I receive (Ouch)
Next costume
(which is a half heart down each time.)
The problem is it doesn't just go to the next costume and stop. It swoosh's through all of the costumes until I'm not touching the zombie. Any suggestions?
I've tried doing this:
On the zombie:
When flag clicked
Forever
If <touching sprite 1> then
Broadcast (ouch)
And on the hearts:
When I receive (Ouch)
Next costume
(which is a half heart down each time.)
The problem is it doesn't just go to the next costume and stop. It swoosh's through all of the costumes until I'm not touching the zombie. Any suggestions?
- DotDash
- Scratcher
1000+ posts
Trouble with zombie game.
maybe try this for the zombies:
when gf clicked
forever
if <touching sprite> then
[Broadcast (ouch)]
[wait (1) secs]
end
end
Last edited by DotDash (July 27, 2013 23:38:01)
My browser / operating system: MacOS Macintosh X 10.8.5, Chrome 29.0.1547.76, Flash 11.8 (release 800)
- zorgo9
- Scratcher
2 posts
Trouble with zombie game.
thank you DotDash it lives!!!
Last edited by zorgo9 (July 30, 2013 01:57:33)
- Discussion Forums
- » Help with Scripts
- » Trouble with zombie game.