i am trying to make the screen follow my little dude but all it does is make him pop back at the left end of the screen i would like some help



@TigerCat104 are you using the camera function?
here is an example:
function _update() camera(player.x,player.y) end |
replace player.x and player.y with your x and y coordinate varible
Hope this helps!



If your trying to have the screen scroll when you move off the screen change a var for x and y in camera() that way it bump over a screen in the directions you want



in your code, your problem comes from line:15 :
12: if x > 127 then 13: mx = 16 14: x = 0 15: else 16: mx = 0 17: end |
if x>127 then mx=16 and x=0 so far it's ok
in the next fram, x=0 therefore x<127 else mx=0
to correct this, use elseif x < 0
and think about modifying the x
I propose that :
his message has been translated from french by google, sorry if there are any weird phrases
[Please log in to post a comment]