So, the problem is:
Whenever I make a code to duplicate anything in a reaction to an action, i get the problem of having my initial duplicated mc destroyed upon re-duplicating (you fire bullets and the one shot before the last always disappears and so).
The thing is, if you take kirupa’s “How to Fire”-tutorial, download the source and run it, the thing works like a charm. However, even if i copy every last single bit of code and content to a new document, the duplication process acts as described above.
In addition, here’s a quote from the tutorial “How to Fire” (URL below).
http://www.kirupa.com/developer/mx/fire2.htm
[SIZE=2]
How did I find the name of original movie? It’s not the instance name. I simply ran a [FONT=Courier New][COLOR=#336600] trace(this._name)[/COLOR][/FONT] statement in the onLoad handler that gave me the name of the movie clip. With that information handy, [FONT=Courier New][COLOR=#336600] _level0.bullet[/COLOR][/FONT], I was on my way to preventing the movie clip from executing any actions by placing it as a condition in an if statement.
[/SIZE]
Someone, please be kind enough to explain how on earth one would get “_level0.bullet” from something the likes of “trace(this._name)”, which, of course, returns the instance name. Which would, in the aforementioned tutorial’s case, be, in fact, “bullet”. Not “_level0.bullet”. He states “It’s not the instance name”… Well, what the heck is it then? The result of the trace in question varies relying COMPLETELY upon the given instance name. If you write “Bratwurst” as the instance name, you get “Bratwurst” from the trace, as god is my wittness.
Even if i remove EVERYTHING from the code that even COULD, by the user’s will, remove the duped mc, the initial problem remains. You can only fire one bullet at any given time, other(s) disappear.
It’s most propable that there’s just something i’ve missed completely, and end up making myself looking like an ***, but still.
For those who want a code, just take a look at the tutorial (the URL above). Everything’s basically the same. I would also appreciate if someone were to try what i’ve described, which is to copy everything from the tutorial .fla and placing the stuff on a fresh document.
If the code in the tutorial is not even compatible with MX2k4, please inform me.
Truely i know that if there are people who can help me, they are browsing these forums. I hope you don’t see this as a rant, i’m hung over and trying to get over this problem like a madman. Imagine that, a person who has no professional obligations towards programming or anything of the sort spending an entire weekend just trying to get his tank tracks work in his pitiful game (they do spawn properly as the clip dupes, but only 1 piece of the track remains every time ;()