I’m trying to check if character has stopped. To do that I am trying to keep track of “old” positions comparing to new ones (as I’m changing x/y directly). However it seems like old x/y saving happens several times per frame which makes it useless as at frame’s end it contains same x/y as currents. Isn’t there any condition that will let me do something at end/beginning of frame? Thought about using timers with really short intervals, but I old x/y may be too old by the time I check them.
Events are executed exactly one time “between” each frame. (In fact, we can even say that they are part of the frame rendering):
Events launched > Screen refreshed > Events launched > Screen refreshed > Events launched > Screen refreshed…
So one frame is just Events launched > Screen refreshed.
Then how comes my oldy and current y is same? I literally have following conditions:
and in next (i.e. after comparison) event:
(no conditions) | set oldy of object to object.Y()
Similar for x, but you get the point. Because of that my game reports character is not moving, when he is.
If you reproduce the bug on a simple, minimal game I’ll investigate it.
Events are always executed in their order, only once “each” frame because they are part of the frame rendering.
As you can see, label goes STOP instantly even though pea is clearly moving. Happens also for laughably small values, like 0.001 in expression events.