• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Is autocast on?

Status
Not open for further replies.
If you want to check it for a specific ability, then tracking the "abilityon" and "abilityoff" orders can let you track whether it is on or off.

For example, if it is a faerie fire based ability, when faeriefireon order is used, it means that unit has turned on faerie fire autocast, then you can save this this bool somewhere (associated with the unit obviously), when it uses faeriefireoff, just change it to false.
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
The problem with this approach is stuns or other pausing effects.
1. you get stunned
2. you order fearie fire on, but it will only happen after the stun. However the variable is set to true.
3. you order stop, to overwrite the last order
4. stun expires, unit uses "stop", but not "faeriefireon". The variable is set to true, but autocast is off.

You can use the fact, that order functions return whether they are succesful.
If you order a unit to "feariefireon" and it is succesful, you know that the unit previously had faerie fire deactivated.

If you combine HappyTauren's method with this idea, it will also work, if the unit is paused.
 
Status
Not open for further replies.
Top