Go down for the main post
Hi, I am woring on a mod that forces the next level when the level finish type is the flagpole (even in 1-4), but when it is a axe, which is supposed to be the access to the next world, Mario stays on the same level and start it again and again.
I think I made a mistake, all I did is change the "nextlevel" function (game.lua, line 3438) to:
But what did I do wrong?
Please I need help.
I LÖVE LUA
EDIT : Flagpole brings you to world 1-5. This part works.
EDIT 2 : I know where I am wrong. Here is the correct code:
I think I made a mistake, all I did is change the "nextlevel" function (game.lua, line 3438) to:
Code: Select all
function nextlevel()
love.audio.stop()
if levelfinishtype == "flag" then
mariolevel = mariolevel + 1
end
if levelfinishtype == "axe" then
mariolevel = 1
marioworld = marioworld + 1
end
levelscreen_load("next")
end
Please I need help.
I LÖVE LUA
EDIT : Flagpole brings you to world 1-5. This part works.
EDIT 2 : I know where I am wrong. Here is the correct code:
Code: Select all
function nextlevel()
love.audio.stop()
if levelfinishtype == "flag" then
mariolevel = mariolevel + 1
else
mariolevel = 1
marioworld = marioworld + 1
end
levelscreen_load("next")
end