Hey guys, been bashing my face against this issue for some time now and I've figured It's time to get help.
I have a unit that autocasts a Haste buff on friendy units, with a 3 second cooldown. The buff lasts 30 seconds. This works fine.
The unit also has a weapon that he shoots when Haste is on cooldown. Sounds good.
Haste autocast and manual cast have a validator to check the Haste behavior count on the unit, so it wont re-cast on units that are already hasted. This also works.
Where this is breaking: Once all nearby units are Haste buffed, and the ability comes off cooldown again, the casting unit will "lock onto" a given unit STILL WITH HASTE and do absolutely nothing until the buff wears off the unit so it can reapply the buff. This means the unit is sitting there like an idiot instead of firing its weapon when there is nothing available to Haste.
Any ideas? I can provide much more detail if needed. Thanks for your time!
Try digging around in the "priority" lists, I know there's one for right-click actions ("Smart Priority"), maybe there's one for do-when-idle actions too?
In the worst case, use an Enumerate Area validator to disable autocast (or even block the entire ability) if there are no unbuffed units in range. Enumerate Are basically is a regular Search filter, and like the effect it can query a validator in the filter targets to count buff stacks.
Hey guys, been bashing my face against this issue for some time now and I've figured It's time to get help.
Where this is breaking: Once all nearby units are Haste buffed, and the ability comes off cooldown again, the casting unit will "lock onto" a given unit STILL WITH HASTE and do absolutely nothing until the buff wears off the unit so it can reapply the buff. This means the unit is sitting there like an idiot instead of firing its weapon when there is nothing available to Haste.
Any ideas? I can provide much more detail if needed. Thanks for your time!
Try digging around in the "priority" lists, I know there's one for right-click actions ("Smart Priority"), maybe there's one for do-when-idle actions too?
In the worst case, use an Enumerate Area validator to disable autocast (or even block the entire ability) if there are no unbuffed units in range. Enumerate Are basically is a regular Search filter, and like the effect it can query a validator in the filter targets to count buff stacks.
@Photoloss: Go
Your suggestion to create an enumerate area validator worked like a charm. Thanks Photoloss!