Hi folks and folkettes,
I’ve caught my eye on math.round which i suspect is exactly what i need.
But i’m unsure how to implement it.
Camera Control
if (RobotPlayer.x \> 240 and RobotPlayer.x \< 1680) then
game.x = -RobotPlayer.x + \_W/2
end
if (RobotPlayer.y \> 160 and RobotPlayer.y \< 480) then
game.y = -RobotPlayer.y + \_H/2 --
end
game.x and game.y control the ‘camera’ and keep it focused on the character. I have the correct values there, but i don’t know how’d i’d stick math.round in.
Any ideas?
I want game.x and game.y to be rounded to the nearest integer.
Thanks.
Matt.
[import]uid: 91798 topic_id: 20269 reply_id: 320269[/import]
