i read the tutorial, and can’t get it to work…
i’m trying to get the bullet to be duplicated at the correct position each time the gun is fired
the fla is attached, will someone plz tell me what i’m doing wrong?
thanks
BTW- all artwork was made by porpous (except the line that he walks on lol)
Your problem is where you have your code to duplicate your bullet. But this doesnt mean that its in the wrong place. Just means that your code in the gun mc wasnt being executed.
The fla is too big for me to attach so this is what i did. I added a layer called ‘bullet fired’ in the ‘rightshoot’ instance mc.
I put the code in there on the second frame, instead of using the enterFrame handler in the gun movie clip.
This is just a start so it will only fire properly to the right, and not the to left, try it and see what happens, then try and fix it.
Have fun and good luck,
Regards,
Viru.
P.S If you dont get what i did then let me know and i’ll take out what isnt needed in the fla and then i’ll try and post it again.
i got it to work… sort of
it continuously fires, i need it to only fire when it gets to that frame, then the gun backfires, goes back into position and executes the code again, right now, for some reason it does it on every frame even though i only have the following code on one frame:
onEnterFrame = function () {
_root.gunx = 385;
_root.guny = 215;
i = i+1;
duplicateMovieClip(_root.bullet, "bullet"+i, i);
};