Levels.
I tried to make a code for spawnpoints and portals, for when the player arrive in the final of map, he is teleported to Level 2 but i just crashed the game lmao, but How can i do it in my platformer game, PLIS TEL ME, I DON'T WANNA TO CRASH MY GAME AGAIN.
Link of my game: https://microstudio.io/rianstar/joyultraadventure/
Thanks for the help(i won't crash my game again)
@Loginus it ins't working, what i wrote wrong in my code?
file a_main
function update()
if mode == "go_to_nextlevel" then
currentLevel = ( currentLevel + 1) % 3
if currentLevel == 0 then currentLevel += 1 end
createLevel = ( currentLevel )
end
it should be
if mode == "go_to_next_level" then
currentLevel = ( currentLevel + 1) % 3
if currentLevel == 0 then currentLevel += 1 end
createLevel( currentLevel )
end