2015-02-20 12:26:09 +00:00
|
|
|
local global = require( "global" )
|
|
|
|
if(global.triggeredOpenDoor2undo == nil) then
|
|
|
|
global.triggeredOpenDoor2undo = true
|
2015-01-17 12:37:09 +00:00
|
|
|
end
|
|
|
|
function trigger(objectToChange)
|
2015-02-20 12:26:09 +00:00
|
|
|
if(global.triggeredOpenDoor2undo == false) then
|
2015-01-17 12:37:09 +00:00
|
|
|
if(not level) then
|
|
|
|
print("No level found in Lua!")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2015-02-20 12:26:09 +00:00
|
|
|
if(global.triggeredOpenDoor2) then
|
|
|
|
global.openDoorCounter = global.openDoorCounter - 1
|
|
|
|
global.triggeredOpenDoor2 = false
|
2015-01-17 12:37:09 +00:00
|
|
|
end
|
|
|
|
|
2015-02-20 12:26:09 +00:00
|
|
|
global.triggeredOpenDoor2undo = true
|
2015-01-17 12:37:09 +00:00
|
|
|
print("openDoor2undo")
|
|
|
|
end
|
|
|
|
end
|