Code: Select all
data.raw.resource["coal"].selection_box = ...
Code: Select all
data.raw.resource["coal"].selection_box = ...
Maybe we can change autoplace settings?Degraine wrote:This should be in the Modding Help subforum. As to the question...I'm not sure what you're trying to do. You can't alter the selection box of an entity ingame as far as I know, all that data is loaded and locked in at startup.
Code: Select all
game.entityprototypes.autoplace
You can't change the selection box runtime. You would need to make 2 different coal entities and swap them out when a drill is placed.KaraUL! wrote:Have a strange question, i begin to think, its impossible, SO how to change resource\entity parameters while catching certain event? Example i have zero selection boxes for coal at the game start. I need to change parameters of coal (type=resource) when event onbuiltentity (for example) is catched. I tried to callin "control.lua" but game said glob "data" is nil. Can u help me, any ideas how to solve thisCode: Select all
data.raw.resource["coal"].selection_box = ...
Rseding91 wrote:You can't change the selection box runtime. You would need to make 2 different coal entities and swap them out when a drill is placed.KaraUL! wrote:Have a strange question, i begin to think, its impossible, SO how to change resource\entity parameters while catching certain event? Example i have zero selection boxes for coal at the game start. I need to change parameters of coal (type=resource) when event onbuiltentity (for example) is catched. I tried to callin "control.lua" but game said glob "data" is nil. Can u help me, any ideas how to solve thisCode: Select all
data.raw.resource["coal"].selection_box = ...