This content has been marked as final. Show 3 replies
Hmm ok after some investigation Ive found out that whats happening is that each time I make a new instance of bullet its just putting it in exactly the same place as the old one and not doing anything.
The examples I looked at seemed to have the bullet MC following the tank around and making a new one each time it fired. Really Id rather I could create the bullet when I fire and not have one following the tank thing around otherwise moving the tank involves moving the bullet mc around too. Plus on top of that I wanted to make a couple of different explosions for the bullet (depending what it hit) and I dont want to have to have those follow the whole arrangement around just incase they are needed.
Basically Im asking how I can just grab an MC out the air and get it to
1- appear with the properties I want (_x, _y, speed, _rotation etc)
2- still follow some set code for that object
Im thinking this might require use of seperate .as files?
try using attachMovie instead of duplicateMovieClip as it is always error prone and tend to loose control on app.
hmm ok maybe the problem is that Im trying to use info from the soldier instance to set up the bullet.
So there is code like
this._rotation = soldier1._rotation;
within the bullet instance
Which by the looks of some traces Ive done just gives soldier1._rotation as undefined.
How can I pass a value out of soldier1 to use here?