Is it possible to set a command for a robot

Place to get help with not working mods / modding interface.
dogbert514
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Jan 05, 2018 8:24 pm
Contact:

Is it possible to set a command for a robot

Post 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.
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: Is it possible to set a command for a robot

Post 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.
Post Reply

Return to “Modding help”