Files
jailsadventure2/data/m_arq.lua

44 lines
1.3 KiB
Lua

levels["arq"]={
load=function()
mapa.load("test.map")
actors.add({name="estudiant",x=18,y=11,o="r",gfx={x=0,y=48}})
actors.add({name="estudiant",x=16,y=12,o="l",gfx={x=128,y=0}})
switches.add({x=32,y=25,w=1,h=1,action=
function()
local hero = actors.search(actors.main.name)
if hero.o=="u" then
game.paused = true
fade.fadeout()
actors.main.x=9
actors.main.y=16
actors.main.o="u"
actors.main.level="prac1"
game.init("prac1")
return true
else
return false
end
end
})
switches.add({x=6,y=11,w=1,h=1,action=
function()
local hero = actors.search(actors.main.name)
if hero.o=="u" then
game.paused = true
fade.fadeout()
actors.main.x=6
actors.main.y=15
actors.main.o="u"
actors.main.level="jail1"
game.init("jail1")
return true
else
return false
end
end
})
end,
}