diff --git a/game.lua b/game.lua index e1603db..4bba134 100644 --- a/game.lua +++ b/game.lua @@ -118,6 +118,8 @@ function game_init(menu) table.insert(actors,trigger.new(14,40,32,triggers.teleport_a)) table.insert(actors,trigger.new(67,8,32,triggers.teleport_b)) + table.insert(actors,trigger.new(29,40,32,triggers.teleport_c)) + table.insert(actors,trigger.new(61,8,32,triggers.teleport_d)) score.create() cameras[0]=gps @@ -289,24 +291,24 @@ function update_game() fireball.update() switches.update() - local hx = abad.hab%10 - local hy = flr(abad.hab/10) - if btnp(KEY_RETURN) then - mode=modes.editing - mapa_restore_backup() - elseif btn(KEY_LSHIFT) and btnp(KEY_RIGHT) and hx<9 then - abad.hab=abad.hab+1 - elseif btn(KEY_LSHIFT) and btnp(KEY_LEFT) and hx>0 then - abad.hab=abad.hab-1 - elseif btn(KEY_LSHIFT) and btnp(KEY_DOWN) and hy<7 then - abad.hab=abad.hab+10 - elseif btn(KEY_LSHIFT) and btnp(KEY_UP) and hy>0 then - abad.hab=abad.hab-10 - elseif btnp(KEY_M) then - mute = not mute - elseif btnp(KEY_ESCAPE) then - pause() - end + --local hx = abad.hab%10 + --local hy = flr(abad.hab/10) + --if btnp(KEY_RETURN) then + -- mode=modes.editing + -- mapa_restore_backup() + --elseif btn(KEY_LSHIFT) and btnp(KEY_RIGHT) and hx<9 then + -- abad.hab=abad.hab+1 + --elseif btn(KEY_LSHIFT) and btnp(KEY_LEFT) and hx>0 then + -- abad.hab=abad.hab-1 + --elseif btn(KEY_LSHIFT) and btnp(KEY_DOWN) and hy<7 then + -- abad.hab=abad.hab+10 + --elseif btn(KEY_LSHIFT) and btnp(KEY_UP) and hy>0 then + -- abad.hab=abad.hab-10 + --elseif btnp(KEY_M) then + -- mute = not mute + --elseif btnp(KEY_ESCAPE) then + -- pause() + --end if abad.objects.gps~=nil then if btnp(KEY_1) then if abad.objects.gorro==nil and abad.objects.clau_premiere==nil then current_camera=1 end diff --git a/trigger.lua b/trigger.lua index 95e175e..2af3469 100644 --- a/trigger.lua +++ b/trigger.lua @@ -87,3 +87,22 @@ function triggers:teleport_b() abad.x=16 end end + +function triggers:teleport_c() + abad.teleport2=true + playsnd(audio_hit) + cls(14) + imp.reset() + abad.hab=61 + abad.x=24 +end + +function triggers:teleport_d() + if abad.teleport2 then + playsnd(audio_hit) + cls(14) + imp.reset() + abad.hab=29 + abad.x=24 + end +end