- segon teleport

- tecles debug llevades
This commit is contained in:
2023-01-13 14:23:28 +01:00
parent a5f8703830
commit 3d9cbaef3d
2 changed files with 39 additions and 18 deletions

View File

@@ -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

View File

@@ -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