Saxum/data/levels/scripts/openDoor2undo.lua
2015-02-20 13:26:09 +01:00

21 lines
584 B
Lua

local global = require( "global" )
if(global.triggeredOpenDoor2undo == nil) then
global.triggeredOpenDoor2undo = true
end
function trigger(objectToChange)
if(global.triggeredOpenDoor2undo == false) then
if(not level) then
print("No level found in Lua!")
return
end
if(global.triggeredOpenDoor2) then
global.openDoorCounter = global.openDoorCounter - 1
global.triggeredOpenDoor2 = false
end
global.triggeredOpenDoor2undo = true
print("openDoor2undo")
end
end