[NEW] Triggers per event
This commit is contained in:
@@ -223,40 +223,40 @@ function premiere.update_falling()
|
||||
end
|
||||
end
|
||||
|
||||
function premiere.healer_init()
|
||||
if premiere.update==premiere.update_healer then return true end
|
||||
premiere.hab = 54
|
||||
premiere.x = 2
|
||||
premiere.y = 3
|
||||
local world_x, world_y = coords.room_to_world(premiere.hab,premiere.x,premiere.y)
|
||||
premiere.x=world_x
|
||||
premiere.y=world_y
|
||||
premiere.health_wait = 100
|
||||
premiere.update = premiere.update_healer
|
||||
end
|
||||
|
||||
function premiere.update_healer()
|
||||
-- Esperar mentres dona la vida
|
||||
if premiere.health_wait>0 and premiere.health_wait<100 then
|
||||
premiere.health_wait = premiere.health_wait - 1
|
||||
else
|
||||
premiere.x = premiere.x+1
|
||||
end
|
||||
|
||||
-- Lloc de pausa
|
||||
local hab, tx, ty = coords.world_to_tile(premiere.x, premiere.y)
|
||||
if hab == 55 and tx==0 and ty==3 and premiere.health_wait==100 then
|
||||
-- 55 (0,3)
|
||||
table.insert(
|
||||
dialegs,
|
||||
{ actor1=premiere,
|
||||
actor2=abad,
|
||||
distancia=500,
|
||||
direccio = "",
|
||||
enabled=true,
|
||||
text="Tenne! Io t'achudo. Figo!"
|
||||
}
|
||||
)
|
||||
premiere.health_wait = premiere.health_wait - 1
|
||||
end
|
||||
end
|
||||
-- function premiere.healer_init()
|
||||
-- if premiere.update==premiere.update_healer then return true end
|
||||
-- premiere.hab = 54
|
||||
-- premiere.x = 2
|
||||
-- premiere.y = 3
|
||||
-- local world_x, world_y = coords.room_to_world(premiere.hab,premiere.x,premiere.y)
|
||||
-- premiere.x=world_x
|
||||
-- premiere.y=world_y
|
||||
-- premiere.health_wait = 100
|
||||
-- premiere.update = premiere.update_healer
|
||||
-- end
|
||||
--
|
||||
-- function premiere.update_healer()
|
||||
-- -- Esperar mentres dona la vida
|
||||
-- if premiere.health_wait>0 and premiere.health_wait<100 then
|
||||
-- premiere.health_wait = premiere.health_wait - 1
|
||||
-- else
|
||||
-- premiere.x = premiere.x+1
|
||||
-- end
|
||||
--
|
||||
-- -- Lloc de pausa
|
||||
-- local hab, tx, ty = coords.world_to_tile(premiere.x, premiere.y)
|
||||
-- if hab == 55 and tx==0 and ty==3 and premiere.health_wait==100 then
|
||||
-- -- 55 (0,3)
|
||||
-- table.insert(
|
||||
-- dialegs,
|
||||
-- { actor1=premiere,
|
||||
-- actor2=abad,
|
||||
-- distancia=500,
|
||||
-- direccio = "",
|
||||
-- enabled=true,
|
||||
-- text="Tenne! Io t'achudo. Figo!"
|
||||
-- }
|
||||
-- )
|
||||
-- premiere.health_wait = premiere.health_wait - 1
|
||||
-- end
|
||||
-- end
|
||||
Reference in New Issue
Block a user