Move actor to a round (integer) position after key/attributes are false?
mhedges
Raised on VCSMember Posts: 634
Hello -
I have a simple query, but the response still eludes me. I have an actor which I move with a boolean (and key down as an alternative while I work on it). For example,
IF (any) RPressed = true OR key Right is down,
self.Motion.Linear Velocity X = 150
When the actor moves, it can move to any X coordinate. For the sake of example, let's say 345.11 .
My question is: How can I round that value to 345 so the actor stays at 345 the IF described above is false?
Thanks, regards.
Comments
There are functions which you can see in the expression window drop down menus called ceil and floor
Scroll down to the function list on this page
http://help.gamesalad.com/windows-cookbook/getting-started/11-glossary/
@KevinCross ,
Of course! Floor worked like a charm. I was looking for "int" like a fool and couldn't find it . Thanks much.
My Blog / App Store / Google Play