What I need to know is how to round the Sprite.X of an object to the nearest multiple of 80. For example if Sprite.X = 76 I want it to round up to 80 or if Sprite.X = 178 i want it to round down to 160. I know round(Player.X) rounds the number to a whole number but i need it to round to the nearest 80.
Thanks :}
Develop games in your browser. Powerful, performant & highly capable.
thankyou everyone it now works
Thanks I tried it, kinda worked, but I want to do something like SetText: X 80 percent of the time and Y 20 percent (it is not a condition but an action so can not do else)
For example I have two scenarios X and Y.
When a button is pushed I want it so X pops up on the screen 80 percent of the time when the other 20 Y pops up.
Thank you for your help!
I came across a problem that when I have two enemy sprites following my character they overlap . I want to figure out how to make them not overlap but still follow the position of the character. It would make my day if somone helped me with this and posted the code in the replies. Thanks!!
Member since 5 May, 2014