Zero-K icon indicating copy to clipboard operation
Zero-K copied to clipboard

Striderhub tracks finished damaged unit instead of building new one

Open rlcevg opened this issue 10 years ago • 6 comments

Battle with bug description: http://zero-k.info/Battles/Detail/397252

Build order issued on UnitIdle event:

unit->Build(striderDef, pos, -1, 0, currentFrame + 300);

i.e. options = 0

Yet i didn't try to force-clean striderhub's command queue on every hub's UnitIdle event, or invoke Stop before Build.

rlcevg avatar Jan 29 '16 16:01 rlcevg

I've seen this also. Using a stop order might work, but I haven't tried it and it's difficult to test at any rate.

aeonios avatar Jan 29 '16 17:01 aeonios

I misunderstood the bug. Probably there was no direct build order after damaged unit was finished, because there was no UnitIdle event for striderhub. So the workaround should be:

  1. on UnitCreated (dante) AI remembers builder (striderhub)
  2. on UnitFinished (dante) issue new order for striderhub.

rlcevg avatar Jan 29 '16 17:01 rlcevg

This isn't a bug, it is how every constructor works. If you like, you could add a state that controls whether constructors repair their completed projects or move on to the next one if they have something in their queue. I'm not sure it would be worth the space on the UI though, perhaps advanced state toggles need an option to show/hide them.

GoogleFrog avatar Jan 11 '17 07:01 GoogleFrog

Do automatically-assigned repair orders get purged when the unit moves out of range of an immobile con? If not that should be changed.

sprunk avatar Jan 11 '17 15:01 sprunk

There is no automatically assigned repair order. The current behaviour is that the build order is kept until the built unit has full health.

GoogleFrog avatar Jan 12 '17 02:01 GoogleFrog

don't think so. If a strider is injured while being constructed, unitIdle is never ever called for the strider hub, even after the strider reaches full hp.

aeonios avatar Jan 12 '17 04:01 aeonios