Saxum/data/levels/scripts/Template.lua

40 lines
1.0 KiB
Lua
Raw Normal View History

local global = require( "global" )
if(global.triggeredSCRIPTNAME == nil) then
global.triggeredSCRIPTNAME = false
end
2015-03-05 17:30:50 +00:00
if(global.triggeredSCRIPTNAMEUndo == nil) then
global.triggeredSCRIPTNAMEUndo = false
end
function trigger(objectToChange, printDebug)
if(global.triggeredSCRIPTNAME == false) then
if(not level) then
print("No level found in Lua!")
return
end
--enter the scripts code here and replace all occurences of SCRIPTNAME with the name of the script.
global.triggeredSCRIPTNAME = true
if(printDebug) then
print("SCRIPTNAME")
end
end
end
2015-03-05 17:30:50 +00:00
function triggerUndo(objectToChange, printDebug)
2015-03-05 17:30:50 +00:00
if(global.triggeredSCRIPTNAMEUndo == false) then
if(not level) then
print("No level found in Lua!")
return
end
--enter the scripts undo code here
global.triggeredSCRIPTNAMEUndo = true
if(printDebug) then
print("SCRIPTNAMEUndo")
end
2015-03-05 17:30:50 +00:00
end
end