Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Zombie Game
- lan_is_not_in
-
92 posts
Zombie Game
So i'm making a zombie shooter game and currently when i shoot the zombie the bullet kills the zombie, But it goes through the sprite as well causing it to kill other zombies as well. Is there anyway to fix this?
Here's the game : https://scratch.mit.edu/projects/384204057/editor/ (When you start the game you will need to click on the window to and shoot one of the zombies to see the problem)
Here's the game : https://scratch.mit.edu/projects/384204057/editor/ (When you start the game you will need to click on the window to and shoot one of the zombies to see the problem)
- Methanatos
-
100+ posts
Zombie Game
You can have the bullet sprite test if it is
and then the bullet can hide, delete this clone, etc. The difficulty is that the bullet shouldn't disappear before the zombie has a chance to see if it is touching the bullet. The simplest way is to have the bullet costume change to a little explosion costume for a moment and then disappear.
and then the bullet can hide, delete this clone, etc. The difficulty is that the bullet shouldn't disappear before the zombie has a chance to see if it is touching the bullet. The simplest way is to have the bullet costume change to a little explosion costume for a moment and then disappear.
- lan_is_not_in
-
92 posts
Zombie Game
So would the code be something like this.
———————————–
IWhen green flag clicked“ I
———————————–
I If touching ”Zombie“I
I ———————
I Then switch costume to ”exposion" I
I————————————————-I
———————————–
IWhen green flag clicked“ I
———————————–
I If touching ”Zombie“I
I ———————
I Then switch costume to ”exposion" I
I————————————————-I
- Discussion Forums
- » Help with Scripts
-
» Zombie Game