• 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.

[General] Detecting autocasting abilities

Status
Not open for further replies.
Level 16
Joined
Mar 25, 2016
Messages
1,327
Is somehow possible to detect whether a unit has an ability set to autocast?
You can order the unit to activate/deactivate autocast. The function will return whether it is succesful or not.
If you have autocasting enabled, the order to enable it will fail. If you have it deactivated, the order to disable it will fail.
Using this method you can detect, whether autocast is active or not. You will have to revert the autocast, if your order changed it.

Detecting orders is not safe, because orders can be issued while the unit is paused (e.g. stunned) but won't be executed if you issue another order before the pause effect runs out.
 
Status
Not open for further replies.
Top