- SOLVED -

I am attempting to code one way gates like in Mario Maker, for a new game. However, I ran into a problem where if there's more than one of them on screen despite the players location, they all activate.

What I came up with is 2 objects. One 32x32 object, and the 2nd small 4x32 object (the collision) is the actual gate that gets created on screen if the player is passed it.

So lets say the one way gate is Facing right, This is what I tried:
- [Gate] is facing [->]
+ X position of [player] >= XActionPoint("Gate") + 10
+ Alterable Value A("Gate") = 0
-> Create [Collision] at (0,0) from [Gate]
-> [Gate] -> Set Value A[Gate] to 1

- [Gate] is facing [->]
+ X position of [player] < XActionPoint("Gate") - 10
+ Alterable Value A("Gate") > 0
+ [Collision] is overlapping [Gate]
-> [Gate] -> Set Value A[Gate] to 0
-> [Collision] -> Destroy

However, if the set up is [Gate] on the left of player, and a [Gate] on the right side of player, they BOTH activate. I just want one of them (the one on the left) to activate.
I suppose I would need to do the same for the other directions as well.

I really don't know what to do, other than maybe a fast loop function that counts the # of gates, and which way they are pointing. Any ideas?

EDIT: I added a spread value in alterable value of the 32x32 one way gate objects, and created a loop index to determine which specific ones needed to be activated during the fast loop. That seemed to do the trick.
I need to use this function more often. :-/

- SOLVED -