Page 1 of 1

How do I create entity with an item inside?

Posted: Tue Dec 19, 2017 12:05 pm
by WIZ4
This command creates the chest empty:

Code: Select all

/c game.surfaces[1].create_entity{name = "wooden-chest", position= {0, -1}, insert={name='construction-robot', count=50}, force = game.forces.player}
How to create a chest with a robot inside?

Re: How do I create entity with an item inside?

Posted: Tue Dec 19, 2017 4:26 pm
by quyxkh
Add `.insert{name='construction-robot'}` on the end.

Re: How do I create entity with an item inside?

Posted: Wed Dec 20, 2017 11:02 am
by WIZ4
quyxkh wrote:Add `.insert{name='construction-robot'}` on the end.
It worked, thanks