Invisible ghosts..?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
teemu
Inserter
Inserter
Posts: 44
Joined: Tue Sep 20, 2016 10:08 pm
Contact:

Invisible ghosts..?

Post by teemu »

I tried to create an inserter ghost with the in-game console but it seems to be invisible and in general just not there:

Code: Select all

/c E = game.player.surface.create_entity{name = "entity-ghost", inner_name = "inserter", position = game.player.position, expires = false}
If I, however, use

Code: Select all

E.revive()
then the inserter is "revived" as expected. What's up with this?

321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: Invisible ghosts..?

Post by 321freddy »

This is because you haven't defined a force for the ghost. The force defaults to enemy and you cannot see ghosts of different forces.
If you do this it should work:

Code: Select all

/c E = game.player.surface.create_entity{name = "entity-ghost", force="player", inner_name = "inserter", position = game.player.position, expires = false}

User avatar
teemu
Inserter
Inserter
Posts: 44
Joined: Tue Sep 20, 2016 10:08 pm
Contact:

Re: Invisible ghosts..?

Post by teemu »

Ah right. That explains. Thanks.

Post Reply

Return to “Modding help”