How do I create entity with an item inside?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

How do I create entity with an item inside?

Post 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?
My native language is russian. Sorry if my messages are difficult to read.
quyxkh
Smart Inserter
Smart Inserter
Posts: 1032
Joined: Sun May 08, 2016 9:01 am
Contact:

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

Post by quyxkh »

Add `.insert{name='construction-robot'}` on the end.
User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

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

Post by WIZ4 »

quyxkh wrote:Add `.insert{name='construction-robot'}` on the end.
It worked, thanks
My native language is russian. Sorry if my messages are difficult to read.
Post Reply

Return to “Gameplay Help”