How to take actions when map blocks generate?
Posted: Tue Jun 09, 2015 1:00 am
I was looking at LUA/events for a hook. I saw: onchunkgenerated. It says "Contains area generated" but I'm not familiar with the data type. Does it contain tiles in the generated chunk or just coordinates of the chunk? Something like:
Will this event run for all the original chunks generated during map gen as well? Also, is there a better way to do debugging during runtime for multi-line scripts (so I don't have to keep reloading to test)? I heard about some god mode or test mode that might make it easier to test. LUA seems pretty flexible for this. For example in the above maybe I just want to dump the keys and values in the "event" object so I can see what's going on internally. Does the console accept multi-line input, and if so how?
Code: Select all
require "defines"
game.onevent(defines.events.onchunkgenerated, function(event)
MakeResourcesInChunk(event.area)
end)