I've got a section in my game where the player has a reflective surface on either side of them. I've created a left and right reflection sprite and used "System - Pick by Comparison" to move them horizontally closer and further from the player as the player moves relative to the reflective surface. Currently I have the event sheet set up with:
Every Tick: PlayerReflectionLeft - Set Y to Player.Y
PlayerReflectionRight - Set Y to Player.Y
System: Pick Player where Player.8Direction.VectorX >0
- PlayerReflectionLeft - Set X to SelfX-1
- PlayerReflectionRight - Set X to SelfX-1
System: Pick Player where Player.8Direction.VectorX <0
- PlayerReflectionLeft - Set X to SelfX+1
- PlayerReflectionRight - Set X to SelfX+1
This works perfectly as long as the player only moves horizontally, but as soon as you start moving the player vertically, the reflections both start moving to the left (presumably they're reverting to the Set X to SelfX-1 instruction). The reflections should only change their X when the player is moving horizontally, not vertically. What am I missing?