[0.17.59] LuaUnitGroup.set_command randomly fails

This subforum contains all the issues which we already resolved.
Post Reply
Hornwitser
Fast Inserter
Fast Inserter
Posts: 205
Joined: Fri Oct 05, 2018 4:34 pm
Contact:

[0.17.59] LuaUnitGroup.set_command randomly fails

Post by Hornwitser »

I'm not too sure how much this a bug or not, but when I spawned unit groups and set_command on it to attack area spawn it randomly fails. See the attached save. After one tick the unit group is spawned and the command is set (set_moving is also done, but not doing does not affect the outcome). One tick later the debug drawing shows the group having state 1-moving (likely previous tick, LuaRendering seems to be delayed a tick.). Another tick later the debug drawing shows the group having state 4-finished. The on_ai_command_completed event indicates the command failed.

I worked around it by despawning the group when it failed so nothing important.
Attachments
Bug-stale-group.zip
(1.02 MiB) Downloaded 27 times

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.59] LuaUnitGroup.set_command randomly fails

Post by Klonan »

They seem to work now,
When I loaded the test save they all moved to the center of the attack area

Hornwitser
Fast Inserter
Fast Inserter
Posts: 205
Joined: Fri Oct 05, 2018 4:34 pm
Contact:

Re: [0.17.59] LuaUnitGroup.set_command randomly fails

Post by Hornwitser »

I tested it on 0.17.62 just now and they don't all move to the centre. Is this fixed for the next version or something? (groups still stay stuck on the shore, save is one tick before one of the groups that get stuck spawns.)

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.59] LuaUnitGroup.set_command randomly fails

Post by Klonan »

Oh, the ones near the shore?

I think you are spawning too close to the shore,
The unit group has to pathfind from its current position, and if its colliding with the shore then it won't be able to find a path

Post Reply

Return to “Resolved Problems and Bugs”