Is there a way to force Construct to round up an expression to the nearest whole number, rather than having a decimal number result? I'm moving an object around using loops and timedelta in order to keep things smooth. An example is in the deceleration event:
['Right' key isn't down] [Value 'X Value' is greater than 0]
= [Player: Set 'X Value' to 'Player.Value('X Value')+(Player.Value('Deceleration')*timedelta)
This subtracts a set deceleration value from the players X Value, and a loop is then run that moves the player according to the value of 'X Value'. The deceleration event should continue to subtract from 'X Value' until the value reaches 0 and the object comes to a stop.
The trouble is, due to using the timedelta expression to maintain a smooth framerate, the deceleration value comes out as a decimal value, and so it sometimes doesnt reach the 0 value, meaning my object keeps moving a tiny amount even after it is supposed to have decelerated to a stop.
Basically, is there some sort of expression I can use to force Construct to round up the 'X Value' to a whole number to ensure the value will eventually reach 0 through deceleration?
Hope that makes sense,