in my mod i have to check for 3 certain conditions every second, which happens in "tick.event" so things are being executed every tick. right now i have:
Code: Select all
function process_tick()
current_tick = game.tick
if current_tick % 60 == 36 then
if boolean_toggle1== true then
....stuff here...
end
if boolean_toggle2 == true then
....stuff here...
end
if boolean_toggle3 == true then
....stuff here...
end
because if its ok right now I was thinking of replacing the 3booleans with one string or a number (the toggles control a sequence of events so they can't coexist, that way I can just use "status=1 or 2 or 3")