PDA

View Full Version : Shoot only once


sky_doq
06-30-2001, 06:29 PM
Can somebody help, I am a newbie ( actually not, I am a bit lazy ) but I have this question:

How do I make something shoot ( duplicateMovieClip("targetname") that only fires once, has to wait until the thing that was shot is gone and then you can shoot again ??

Thnx for ya help!

JJ

Jesse
07-01-2001, 02:56 AM
have a broder outside the bounds of the swf. when hitTest on the border and the bullet is true you remove the duplicate and set a variable like 'shooting' to false. only if shooting = false can another shot be fired.

sky_doq
07-01-2001, 05:53 PM
hi Jesse,

thnx for ya help, only I can't get it to work.

what is wrong in the next code ? ( execpt it is normal langugage )

on press

if shoot = false

duplicate the movie and shoot = true

end on

then in the mc itself, if mc_y > 0 setproperty y + move
else if mc_y < 0 shoot = false and remove movieclip

bye

JJ

sky_doq
07-01-2001, 05:58 PM
Sorry,

just fixed the problem, there was another movieclip which was a little bit of in the way, but all solved now.

thnx for ya help again

JJ