[FIX] Afegit run a trigger (mes lògic que com estava abans)
This commit is contained in:
@@ -24,7 +24,13 @@ function trigger.new(_hab,_x,_y,_action,_escena,_id,_type,_doors,_linked_id)
|
||||
enabled=true,
|
||||
disable_reason="",
|
||||
bb=_bb,
|
||||
open_door=triggers.open_door }
|
||||
run=trigger.run }
|
||||
end
|
||||
|
||||
function trigger:run()
|
||||
if self.fun ~= nil then
|
||||
self:fun()
|
||||
end
|
||||
end
|
||||
|
||||
function trigger:update()
|
||||
@@ -118,12 +124,12 @@ function triggers:escena_abad_porta_batman()
|
||||
end
|
||||
|
||||
function triggers:escena_habitacio_batman()
|
||||
if abad.objects.clau_premiere~=nil and
|
||||
abad.objects.clau_elalien~=nil
|
||||
if abad.objects.clau_premiere==nil and
|
||||
abad.objects.clau_elalien==nil
|
||||
then
|
||||
-- switches.start(0,0)
|
||||
local trigger = trigger.new(abad.hab,1,1,nil,"","porta acces cacaus","",{20, 53,41})
|
||||
trigger:open_door()
|
||||
local trigger_porta = trigger.new(abad.hab,1,1,triggers.open_door,"switch","porta acces cacaus","",{20, 53,41})
|
||||
trigger_porta:run()
|
||||
bol.furtat=true
|
||||
abad.objects.clau_premiere=nil
|
||||
abad.objects.clau_elalien=nil
|
||||
|
||||
Reference in New Issue
Block a user