I added autocast to the stimpack ability with two validators. The first validator checks if the buff is present, and the second is blizzard's CasterIsAttacking validation. When the autocast (and the stimpack buff itself) is active the game will often crash as the unit is about to shoot an enemy unit. I have not yet determined exactly why this happens, or what can be done to avoid it. If anyone has any ideas, help would be appreciated.
I'm not sure, but it's possible that it's trying to cast it too many times between the point where it attacks and actually casts the spell. Or it can't be "IsAttacking" and cast the buff at the same time. Those would be my two guesses. I'd offer to take a look, but I'm about to head out. If you'll still having issues later, I'll see what I can do.
Well lets see here. I played with it a bit more. The crash seems to occur when the unit is performing an attack action and is issued another attack order with autocast active. This occurs even if the attack validator is absent. I tried adding a short cooldown to the ability, that had no effect as well. I addition I found that the require vision flag was set and cleared it. The game still crashes.
Edit: The crash seems to occur when the unit is performing an attack action and is issued another attack order with autocast active, while enemies are nearby (uncertain if it is attack range, vision range, autocast range or something else).
Edit2: its autocast range. With autocast range at 0 the ability never is activated.
Edit3: is seems to be an acquire problem. Setting acquire to defensive or offense still causes game to crash when enemies approach autocast range. Setting acquire to none or passive cause the ability not to work. Setting autocast range to .001 still causes crash against melee.
Edit4: workaround found. All four unit ownership filters are disabled. Not an ideal solution and seems potentially unstable, but seems to be working for now. Any ideas how to get a more ideal solution would be appreciated.
Edit5: no, its not working. its not crashing, but right clicking an enemy now does nothing while right clikcing yourself causes stim. That makes little sense to me...
Edit6: I should probably just repost at this point. it was the smart flag.
Er...kind of. Its working and seems to be stable, but I wouldn't call it all figured out. Its just one of those things that works, but I'm not sure why. I'll likely leave it as it is however.
I added autocast to the stimpack ability with two validators. The first validator checks if the buff is present, and the second is blizzard's CasterIsAttacking validation. When the autocast (and the stimpack buff itself) is active the game will often crash as the unit is about to shoot an enemy unit. I have not yet determined exactly why this happens, or what can be done to avoid it. If anyone has any ideas, help would be appreciated.
@qerodar: Go
I'm not sure, but it's possible that it's trying to cast it too many times between the point where it attacks and actually casts the spell. Or it can't be "IsAttacking" and cast the buff at the same time. Those would be my two guesses. I'd offer to take a look, but I'm about to head out. If you'll still having issues later, I'll see what I can do.
Well lets see here. I played with it a bit more. The crash seems to occur when the unit is performing an attack action and is issued another attack order with autocast active. This occurs even if the attack validator is absent. I tried adding a short cooldown to the ability, that had no effect as well. I addition I found that the require vision flag was set and cleared it. The game still crashes.
Edit: The crash seems to occur when the unit is performing an attack action and is issued another attack order with autocast active, while enemies are nearby (uncertain if it is attack range, vision range, autocast range or something else).
Edit2: its autocast range. With autocast range at 0 the ability never is activated.
Edit3: is seems to be an acquire problem. Setting acquire to defensive or offense still causes game to crash when enemies approach autocast range. Setting acquire to none or passive cause the ability not to work. Setting autocast range to .001 still causes crash against melee.
Edit4: workaround found. All four unit ownership filters are disabled. Not an ideal solution and seems potentially unstable, but seems to be working for now. Any ideas how to get a more ideal solution would be appreciated.
Edit5: no, its not working. its not crashing, but right clicking an enemy now does nothing while right clikcing yourself causes stim. That makes little sense to me...
Edit6: I should probably just repost at this point. it was the smart flag.
So you figured it all out?
@Grogian:
Er...kind of. Its working and seems to be stable, but I wouldn't call it all figured out. Its just one of those things that works, but I'm not sure why. I'll likely leave it as it is however.
I'm getting this same problem and have no idea what it is.