The topic says it all: I can't figure out how to achieve that.
I have multiple Doors in my layout that do open automatically using a coordinate-tween upon collision with the player. That does work great.
Then i use a timer to close that particular door automatically after a couple of seconds.
Now my BIG problem: I don't want it to "crush" the player, should it be within the door's closing range
I know there's the distance expression, and that should do the trick, however, how can i tie that to the door instance that just triggered the last (door open and close) event?
Unfortunately i cannot do System -> Compare two values -> first value -> distance(Self.X, Self.Y, Player.X, Player.Y). That would be so easy. Too easy, maybe.
Am i missing something? Do i really need to store the last door's X and Y globally for that to work? That would surely mess up things with multiple door events within a short timeframe i am afraid.
Can anybody enlighten me? Thanks so much :-)