This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-03-22 19:33:21

schobel
New Scratcher
Registered: 2013-03-21
Posts: 6

help bullet shooting script

hello people i am new to scratch i started a few days ago i wanted to make a shooting game like zombie but the case is i wanted to make that the sprite bullet after it hit a zombie dissapear ( not like hide) , since im using like 2d map like mario so i have that if the buller (sprite )  touches the zombie the zombie dissapear but since is more than one zombie it hits all of them with one shot .


is there a way or making that the bullet dissapear completely like before it touches the edge and not affecting the other zombies that are after the first one ?

Offline

 

#2 2013-03-22 19:38:46

schobel
New Scratcher
Registered: 2013-03-21
Posts: 6

Re: help bullet shooting script

heres my script for the zombie 

 when gf clicked
                                                                    show
                                                                     forever if touching bullet
                                                                      hide
heres the one for the bullet sprite
when space bar key pressed
go to kiwi(main sprite)
show
repeat until touching zombie or edge
move 10 step
repeat over
hide 
when space bar key pressed over

Offline

 

#3 2013-03-22 20:46:27

Harald
New Scratcher
Registered: 2013-03-05
Posts: 34

Re: help bullet shooting script


when I receive [FF1 v]
point in direction ( [direction v] of [Fire direction v] )
go to [Start position v]
show
repeat until <<touching [edge v]?> or <touching [Enemyt v]?>>
move (Fire Speed) steps
end
hide
end

I've used this in one of my shooting games, and seem to have no problem with it. I hope it helps.

Offline

 

Board footer