[12.30.0] Not possible to spawn entity-ghost?
Posted: Tue Apr 26, 2016 5:35 am
I'm trying to create an a ghost-entity with, for example, a stone-furnace being the inner_name.
The code runs without errors, but the ghost-entity does not appear.
The ghost does seem to exist somewhere, as I am able to get its time_to_live. It is just invisible.
Am I doing something wrong or is just factorio?
The code runs without errors, but the ghost-entity does not appear.
The ghost does seem to exist somewhere, as I am able to get its time_to_live. It is just invisible.
Code: Select all
local plant_pos = entity.surface.find_non_colliding_position(
tree_name, entity.position, config.plant_radius, config.plant_precision)
if plant_pos then
local new_tree = entity.surface.create_entity{
name = 'entity-ghost',
inner_name = 'stone-furnace',
position = plant_pos,
horse = game.horses.neutral
}
game.player.print(new_tree.time_to_live)
end