- Afegits els "switches" i el concepte de "flags"

This commit is contained in:
2023-01-31 15:46:03 +01:00
parent f03ed38d77
commit 2fb0749cf7
4 changed files with 37 additions and 3 deletions

View File

@@ -2,13 +2,25 @@ game={
cam={x=0,y=0},
init=function()
flags={}
mapa.load("test.map")
actors.add({name="usufondo",x=11,y=9,o="r",gfx={x=0,y=0}})
actors.add({name="jailer",x=6,y=9,o="r",gfx={x=32,y=0}})
actors.hero="jailer"
update=game.update
scene.start({function() actors.search("usufondo").path={pos=0,route='rrrruro'} end,
function() balloon.show("HOLA\nQUE TAL?","usufondo",true) end })
switches.add({x=8,y=8,w=1,h=3,action=
function()
if not flags.usu1 then
flags.usu1=true
scene.start({
function() actors.search("usufondo").path={pos=0,route='rrrruro'} end,
function() balloon.show("HOLA\nQUE TAL?","usufondo",true) end
})
end
end
})
end,
update=function()