Check out one of the many tutorials on "spread values." Do a search here, and on the clickteam boards. You will find the answers you seek. I had this same question just last week when my enemies had messed up gravity. When one enemy would land, all the other enemies that were falling would stop in midair because when one enemy's falling flag needed to be turned off, MMF was turning off all of them.
You'll need the fastloop object for this. Basically, you need to make a loop for each type of enemy. The loop will run once for every enemy. To distinguish each enemy as an individual, you need to index each with a unique number. This is where spread values come in. Basically, it breaks down like this:
Let's say you have an enemy named Bob. There are three Bobs on the screen, and each should have it's own action, animation, life guage, etc.
1. Make a counter called "bobCounter." This will keep track of the current Bob that the loop is working on. Before the beginning of every loop, set it to ZERO.
2. Name an Alterable Value in your enemy properties to "spread" or "index" or something like that, so you can keep track of what Alt Value it is easily. This is where you will store each enemy's unique identifying number.
3. Start your fastloop like so:
* Always
- Start Loop #1 for NObjects("Bob") loop(s)
This will run your loop once for every instance of "Bob" in your frame. Loop #1 is just an example, you can use whatever number.
4. At the beginning of every loop, use this command:
* Fast Loop object: Loop Trigger #1
- Spread value 0 into Alterable Value "index" of Bob
You can find the Spread Value command under the Alterable Values section. Anyway, when you tell MMF to "Spread value 0," what it's doing is assigning a number to each Bob in the order that it was created, starting with zero. So now each of your Bobs has a different number in it's Alt Value "index." They're now labeled 0, 1 and 2. If you change the command to another number, like "Spread value 2," it will number each of your Bobs starting with 2 so you'd have Bobs 2, 3 and 4. Hope that doesn't confuse you. Let's just stick with "Spread value 0."
5. Now, whenever you perform any action or change any data in one of your Bobs, you need to tell MMF specifically which Bob it's working on. That's where the counter comes in. Since you set it to zero before the loop began, it will start working on Bob 0 first, and only Bob 0, as long as you do this:
* Fast Loop object: Loop Trigger #1
* Alt Value "index" of Bob = value(bobCounter)
- (check for collisions, scan for an opening, punch, move, change animation, yaddayadda whatever)
Now when you tell Bob to change animation, the only Bob changing animation is the Bob who's index number matches the current number in the bobCounter. Which brings us to
6. At the end of your loop, add 1 to bobCounter. Then the loop starts over, and begins work on the next Bob. That's it.
Hope this helps, and that I wasn't too confusing. Just search for those tuts and check them out. Good luck...
I was wondering that, actually. It didn't seem necessary to do the spread value command inside of the loop, but one of the tutorials I read had it set up that way. Oh well, it doesn't make much difference, I guess.
By a route obscure and lonely,
Haunted by ill angels only,
Where an Eidolon, named night,
On a black throne reigns upright,
I have reached these lands but newly
From an ultimate dim Thule
From a wild clime that lieth, sublime,
Out of space
Out of time.