I have a Sprite with the Platform behaviour. I am then simulating controls to make the player move automatically on load to the right.
When the player reaches a certain position I want to increase the movement speed and send the player back in the other direction.
To increase the speed I have the following event:
PlayerSprite | X <= 500 | Add 10 to MovementSpeed and then Set Platform maximum speed to MovementSpeed
It also then switches the direction from right to left, and I have another condition for when the player reaches the left side of the layout to again add more speed and send it back to the right.
It works fine - but it is adding multiple amounts of 10 - so it is firing more than once when it changes direction. I am at a loss to why this is happening. Not sure if it is because the player seems to have inertia so spends more than one tick at an X position of 500 or greater.
I tried having the condition being X is equal to 500, but it never fired because looking at the debug profiler it is never 500 exactly, it will be like 500.9875223355346567.
How can I make it fire the once?