I'm trying to alter the Supply Challenge scenario and I've run into a problem.
It appears I can't have the below tow "defines.events" at the same time
Code: Select all
script.on_event(defines.events.on_tick, function(event)
Code: Select all
script.on_event(defines.events, function(event)
Code: Select all
[code]script.on_event(defines.events.on_tick, function(event)
if game.tick % (2) == 0 then
remove_worms()
end
if game.tick % (60 * 60 * 1) == 0 then -- 3600 one min
local PositionValid = game.surfaces[1].find_non_colliding_position("dune-worker", {1, 1}, 4 , 1)
if PositionValid then
spawn_worker = game.surfaces[1].create_entity({name = "dune-worker", position = PositionValid, force = game.forces.player})
else
game.print("No Position")
end
end
end)
Code: Select all
script.on_event(defines.events, function(event)
story_update(global.story, event, "")
end)
Code: Select all
[code]script.on_event(defines.events.on_tick, function(event)
story_update(global.story, event, "")
if game.tick % (2) == 0 then
remove_worms()
end
if game.tick % (60 * 60 * 1) == 0 then -- 3600 one min
local PositionValid = game.surfaces[1].find_non_colliding_position("worker", {1, 1}, 4 , 1)
if PositionValid then
spawn_worker = game.surfaces[1].create_entity({name = "worker", position = PositionValid, force = game.forces.player})
else
game.print("No Position")
end
end
end)
Clicking the "Next Level" does not fire:
I tried converting everything to "Factorio Standard Library", but even that caused problems with that "Next Level" button.
I could not get the game to recognize me clicking it. So basically the same issue as I'm having with the above.
I'm a little stumped as to how to proceed here.
I can attached my control here, but it's basically just being able to access "defines.events.on_tick" using the Supply Challenge Conrtol and still have that work as intended.
Thanks.