Saxum/data/levels/scripts/unused/openDoor1undo.lua

21 lines
584 B
Lua
Raw Normal View History

2015-02-20 12:26:09 +00:00
local global = require( "global" )
if(global.triggeredOpenDoor1undo == nil) then
global.triggeredOpenDoor1undo = true
end
function trigger(objectToChange)
2015-02-20 12:26:09 +00:00
if(global.triggeredOpenDoor1undo == false) then
if(not level) then
print("No level found in Lua!")
return
end
2015-02-20 12:26:09 +00:00
if(global.triggeredOpenDoor1) then
global.openDoorCounter = global.openDoorCounter - 1
global.triggeredOpenDoor1 = false
end
2015-02-20 12:26:09 +00:00
global.triggeredOpenDoor1undo = true
print("openDoor1undo")
end
end