Page 1 of 1
Is it possible to set a command for a robot
Posted: Fri Jan 12, 2018 3:01 am
by dogbert514
Is there a way to order a robot (construction or logistic) to a position? I tried using set_command, but it fails because robots are not units. I was wondering if I missed something in LuaEntity to order them around.
Re: Is it possible to set a command for a robot
Posted: Fri Jan 12, 2018 7:15 pm
by 321freddy
Unfortunately there is no easy command to create orders for bots.
For logistic bots you have to create a provider and requester chest, set the requests and they will try to fulfill it.
For construction bots you can:
- order the deconstuction of something (see
LuaEntity.order_deconstruction and
LuaSurface.deconstruct_area)
- create a ghost entity which they will try to revive
- create a so called "item-request-proxy" entity which makes constuction bots deliver a specific amount of items to this entity
Create entities with
LuaSurface.create_entity
There is no way to only include specific robot entities without creating a completely seperate logistic network.