PDA

View Full Version : [FMX] Common question: AttachMovie



__FLATLINE__
January 29th, 2003, 09:01 AM
I tried looking for it in the forums because I was sure other people already asked about this, and they did, but none of them got an answer suitable for my situation...

I got a shootout game, when I kill a monster I want it to duplicate until a certain variable reaches a certain number but I keep having problems with it.

Any suggestions?

senocular
January 29th, 2003, 09:55 AM
Originally posted by __FLATLINE__
I got a shootout game, when I kill a monster I want it to duplicate until a certain variable reaches a certain number but I keep having problems with it.

Any suggestions?

duplicate it that number of times? is this duplicate as in duplicateMovieClip or as in attachMovie? ... shoudnt it go away after you shoot it?

__FLATLINE__
January 30th, 2003, 12:48 AM
OK look, I got a monster on stage, it has all the animations and ****, it can shoot, it can die and it can move. What I want is that after I kill it (after it plays the death animation), the monster will be duplicated, ie another one will show up. Prefferably the first monster shouldn't dissapear but I don't know if that's even possible.

I don't know if I should use duplicateMovie or attachMovie because I don't really know how to use any of them right...

senocular
January 30th, 2003, 09:50 AM
if you only have one monster on the screen at a time... or even if you are using more and you just want to replace a dead one continuously, you dont have to remove it and replace it at all. Just use the same one over again.

normal:
-playing moving/shooting frames

death:
-playing dying sequence
-last frame of death is empty frame

^on that empty frame (where its no longer visible on the screen), move the monster to a new location and make him appear as a new one telling it to go back to its 'normal' state.

__FLATLINE__
January 30th, 2003, 04:41 PM
But I DON'T want the monster to dissappear, how can I do that?? :q:

__FLATLINE__
February 1st, 2003, 11:23 AM
Bump! This is important!

pom
February 2nd, 2003, 10:18 AM
Explain exactly what you want to do, I'm not sure I understand what's supposed to happen when the monster dies :-\

__FLATLINE__
February 2nd, 2003, 02:59 PM
I just want a "respawn" point. That when I kill a monster, another one will show up and when I kill the second monster, a third one will show up, and so on until a certain variable reaches a certain number. The problem is, that I don't want the dead bodies to dissappear.

pom
February 2nd, 2003, 03:11 PM
Well, at the end of the dying sequence, assuming that you gave a linkage name to your monster ("monster" for instance :)) put something like this:
mc=_root.attachMovie("monster",1000);
mc._y=500;
mc.onEnterFrame=monsterBehaviour;Does it make sense?

pom :skull:

lostinbeta
February 2nd, 2003, 03:14 PM
Well the 1000 level there Ilyas, that will overwrite the other dead bodies, so shouldn't it be i++ instead?

Since he wants the dead bodies to stay there dead, you would have to put it on a new level.

pom
February 2nd, 2003, 03:15 PM
Yep, you're right :trout:

lostinbeta
February 2nd, 2003, 03:16 PM
:beam:

__FLATLINE__
February 2nd, 2003, 04:00 PM
Thanks Pom! Now I know how to use attachMovie!! :beam:
However I just did what I didn't think about doing before: I looked in the tutorials on Kirupa.com, and I found that duplicate movie tutorial, and it helped me a lot, and now I can duplicate as much monsters as I want without the dead bodies disappearing! GOD I LOVE THIS SITE!!! :geek:

However now I got ANOTHER problem: The depths of the monsters. I opened a seperate thread for that.