Log In  

Okay. So, I am brand spankin' new to coding. I am not quite sure what the proper lingo is.

I am attempting to create a sandbox game, but I have no idea how to make it so that when players reach the edge of the playable screen, they can then continue on into a new screen. "Space Delivery!" and "Carmina's World" accomplishes this.

Please let me know if I am not articulating this properly. Any help is appreciated.

P#44702 2017-09-27 20:38 ( Edited 2017-09-29 00:19)

duplicate post

P#44711 2017-09-28 01:00 ( Edited 2017-09-28 05:00)

You need to make a variable for your mp then you have to change the map variable when you need to move

x=64
map=0
function _update()
 if btn(1) then x+=1 end 
 if x>120 then 
  x=60
  map+=1
 end
end

function _draw()
 print(0,x,60)
 map(map,0,0,0,16,16)
end
P#44715 2017-09-28 14:33 ( Edited 2017-09-28 18:33)

At first, all kinds of wacky was happening. But I think I figured it out. Thank you for your help.

function _draw()
        cls()
        camera (cam_x,cam_y)
        cam_x = player.x-60
        cam_y = player.y-60
        map(0,0,0,0,16*8,16*2,0)
        spr (player.sprite, player.x, player.y)
end
P#44731 2017-09-28 20:19 ( Edited 2017-09-29 00:38)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 06:26:39 | 0.006s | Q:14