Code: Select all
game.surfaces[1].create_entity{name, position, direction, force}
And it seems that, since this is firing during on_built_entity, I can't use entity.surface or entinty.force (Get a LuaEntity not valid error)
The intent of it is that, my mod has entity tiers that are discreetly replaced when a new tier is researched (tiers have different entity health values)
If anyone has any insight into what's going on and can help me fix this, it'd be much appreciated.
*: Sometimes. In my personal saves, it works fine. In the save that the user provided, it does not work. My mod is the only enabled mod in either case.