I have a several instances of the same Active Object. When the player overlaps one, I want it's flag to turn on. When not overlapping, I want it to turn off. Pretty simple, and I've got this working with no problem.
The issue comes when I have two instances of this Active Object in the play area. Because the player isn't overlapping both actives, the flags will not toggle. How can I tell MMF to affect the flag on each of these Active Objects?
Edit: I suppose I could have adjusted the flag of the player, rather than the Active Objects... But still, I'd like to know if it's possible to change each instance of the Object.
Not sure I understand correctly. You want to toggle the flag on two instances of an object if the player only overlaps one of them?
If so, I don't think it's possible without using an intermediary value to get away from MMF's automatic object selection (in which case you'd be better just using a flag on the player sprite anyway)
From what I understand is that he wants the flag "on" for any object the player is overlapping, and for the flag to be "off" if it isn't.
If you code it like this:
Player overlapping active
-Flag ON
Player not overlapping active
-Flag OFF
It doesn't work in cases when both are overlapping and then one stops overlapping. The Flag won't toggle since the player is still overlapping at LEAST one of the objects.
If this is the case then my code will do the trick. At the start of the loop all the flag are turned off, and then it only toggles the flags that the player is overlapping.
Thanks guys. Sorry I explained a bit weird, but my issue was trying to have the flag on all objects, when only overlapping one... I decided to go with changing the player flag instead as I figured it'd be a difficult process.