You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to check if Medivac could use their boost, I tried checking if the medivac was actually boosted, checking its buffs. I've found the Medivacspeedboost buff in the list, but when a medivac is boosted, it doesn't have any buffs.
my code reads as follow but doesn't work (as medivac.buffs is always empty) :
if (notmedivac.has_buff(BuffId.MEDIVACSPEEDBOOST)):
medivac(AbilityId.EFFECT_MEDIVACIGNITEAFTERBURNERS)
The text was updated successfully, but these errors were encountered:
The Unit object don't update themselves. My guess is that you don't refresh the Unit object via
medivac=self.units(UnitTypeId.MEDIVAC)[0]
You can verify this by checking if medivac.position is the same - then you are using an outdated Unit object.
The unit.tag is unique so you can find the medivac in the next frame/iteration (assuming it was not destroyed) via
# Do not use the following as it is slower because it first loops over all units to filter out if they are queens and loops over those again to check if their tags are in the list/set
When trying to check if Medivac could use their boost, I tried checking if the medivac was actually boosted, checking its buffs. I've found the Medivacspeedboost buff in the list, but when a medivac is boosted, it doesn't have any buffs.
my code reads as follow but doesn't work (as medivac.buffs is always empty) :
The text was updated successfully, but these errors were encountered: