Defect bad guy movement. Please help me find out why the detectors won't work properly.[cry]
Defect bad guy movement. Please help me find out why the detectors won't work properly.[cry]
I made a MMF 1.5 version if there's someone who doesn't have MMF2 standard.

You are using "compare 2 general values" instead of "compare to alt value of object".
This means that mmf only tests the first object, even though you are doing a loop. If you use the compare to alt value condition of the object itself then mmf will look at all the objects to see which one matches the loop index, instead of only the first.
EDIT: This is my best explanation:
You have 1 "special object" (internal mmf object that has the compare 2 general values condition in), which I will show as an X, and some enemies (Y) and detectors (Z):
X
YYYYYY
ZZZZZZ
Now, as mmf can only select objects of the type the condition is in, when you use "compare two general values" in the special object it can only pick one object, and that's the special object. It automatically chooses the first of the others when it's asked to retrieve the alt value, but it won't test them all because it only has one "special object" to test:
(Blue is tested, Red are chosen automatically because of the expression, grey not tested)
[color:#0000FF]X[/color]
[color:#FF0000]Z[/color][color:#808080]ZZZZZ[/color]
If you use the compare to alt value condition in the detector then it checks all the detectors against the value:
(blue are tested, green passes the test)
[color:#0000FF]ZZZ[/color][color:#00AA00]Z[/color][color:#0000FF]ZZ[/color]
Then when you test for a matching enemy, if you use "compare to alt value of enemy":
(blue are tested, green passes, red chosen by the expression in the condition, grey failed last condition):
[color:#0000FF]YYY[/color][color:#00AA00]Y[/color][color:#0000FF]YY[/color]
[color:#808080]ZZZ[/color][color:#FF0000]Z[/color][color:#808080]ZZ[/color]
Because there was only one "Z" that passed the last condition it chooses that one automatically for every Y that it is testing.
I kinda understand what you're saying. And it almost works as it should. But for some reason they cannot move at the same time. Only one bad guy can move at one time now. It seems that the fast loop sticks to one object until it hits the wall and then goes to the next one...
[edit: I solved that issue by modifying the
Alterable Value A = LoopIndex("overlap check") condition to this: Alterable Value A = LoopIndex("overlap check") + random(NObjects("Detector") - random(NObjects)
So far it hasn't been a problem but do you believe this is a good or bad solution?

For me now one object moves and stops and then nothing more happens.
If you remove the "only one action when event loops" it works right.
True, this seems much better. It seems to work very well now. Thanks for helping me out!![]()