While working with unitgroups i stumbled on some strange behavior of the path finding.
The pathfinding doesn't work when the center of the group is on an entity of the same force.
How to reproduce ?
1. Create a unit group with some units
2a. Have the group center/position on a entity of its own force (example: nest or silo).
2b. Or set the group to wander, now it will sometimes wander over a nest
3. Give the group a command to move.
Some examples with debug info enabled.
The group center on the middle of the nest:
The group center on a silo of the same force:
[0.16.51] Unitgroup not pathfinding while center of group is on entity of own force.
-
- Inserter
- Posts: 32
- Joined: Thu Mar 24, 2016 10:25 pm
- Contact:
Re: [0.16.51] Unitgroup not pathfinding while center of group is on entity of own force.
Well, the group needs to pathfind, and for that it checks collisions
No commandable entity (unit or unit-group) will path if they are in the middle of another entity
EDIT: But something could be done to fix it, so I will leave it here
No commandable entity (unit or unit-group) will path if they are in the middle of another entity
EDIT: But something could be done to fix it, so I will leave it here
-
- Inserter
- Posts: 32
- Joined: Thu Mar 24, 2016 10:25 pm
- Contact:
Re: [0.16.51] Unitgroup not pathfinding while center of group is on entity of own force.
If I do a "create_unit_group" on a position where an entity already is, it would be my stupid fault .
But what if a nest is created/spawned on the group position.
And the group is then issued a "set_command"? it fails.
Same happens for when a group wanders over an entity.
So i'm not saying that the biters need to walk on top of the a silo
I'm saying that when the group wanders over an entity of its own force (so by using its own wander AI, Not me forcing it there)
A "set_command" fails
But what if a nest is created/spawned on the group position.
And the group is then issued a "set_command"? it fails.
Same happens for when a group wanders over an entity.
So i'm not saying that the biters need to walk on top of the a silo
I'm saying that when the group wanders over an entity of its own force (so by using its own wander AI, Not me forcing it there)
A "set_command" fails
Re: [0.16.51] Unitgroup not pathfinding while center of group is on entity of own force.
Since unit groups are kind of non-physical anyway, I suppose there's not much harm in letting them pathfind through other entities of their own force. Individual members will still have to go around the obstacles, but it should work in cases like these.
So, fixed in 0.17.53.
So, fixed in 0.17.53.