Page 1 of 1
Capsule robots that follow entity
Posted: Tue Feb 14, 2017 3:03 pm
by sore68
Hi
I have a capsule shooting turret. and use create_entity{} (destroyer-capsule)
However, these capsules do not follow the turret.
If I want the capsule to follow the turret, do I have to make a group? Or is there another way?
Re: Capsule robots that follow entity
Posted: Tue Feb 14, 2017 4:25 pm
by Adil
You create combat robot via surface.create_entity and specify its target during creation.
You can only set robots target during its creation.
Here's example from my old mod:
Code: Select all
local companion=ent.surface.create_entity{position=ent.position, name=robot_name, force=ent.force, target=ent}
Re: Capsule robots that follow entity
Posted: Fri Feb 17, 2017 3:15 pm
by sore68
Adil wrote:You create combat robot via surface.create_entity and specify its target during creation.
You can only set robots target during its creation.
Here's example from my old mod:
Code: Select all
local companion=ent.surface.create_entity{position=ent.position, name=robot_name, force=ent.force, target=ent}
Oh thank you.
But I don't control why robots not following with command...
I decided to copy it to "ammo" type capsules and use it.