[Spell] Detecting an ablitiy turned On/Off

Status
Not open for further replies.
Level 6
Joined
Dec 25, 2011
Messages
47
Dear Hive members,
I have been working on a simple spell for a few hours, and I can't find a solution for it.
It is an ability based on searing arrows, but I can find no way in GUI to detect whether the spell is turned on or off; which means I also cannot control the actions that happen when the unit attacks.

Hoping to get a quick response

Pyro
 
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Custom script: if ( GetIssuedOrderId() == OrderId("searingarrows") ) then
      • Set SearingArrowsOn = True
      • Custom script: elseif ( GetIssuedOrderId() == OrderId("searingarrowsoff") ) then
      • Set SearingArrowsOn = False
      • Custom script: endif
 
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Custom script: if ( GetIssuedOrderId() == OrderId("searingarrows") ) then
      • Set SearingArrowsOn = True
      • Custom script: elseif ( GetIssuedOrderId() == OrderId("searingarrowsoff") ) then
      • Set SearingArrowsOn = False
      • Custom script: endif

How about spells like mana/divine shield, which you can turn on and off? Same thing?
 
How about spells like mana/divine shield, which you can turn on and off? Same thing?

For Mana Shield, i would check if the unit has the mana shield buff because it can be deactivated by losing all of your mana. For divine shield, it would be set by a Unit - Any unit starts the effect of an ability. Ability = Divine Shield (because divine shield cannot be interrupted or ended before the duration is expired)
 
For Mana Shield, i would check if the unit has the mana shield buff because it can be deactivated by losing all of your mana. For divine shield, it would be set by a Unit - Any unit starts the effect of an ability. Ability = Divine Shield (because divine shield cannot be interrupted or ended before the duration is expired)

You can make divine shield like mana shield, turn on, turned off, but if duration expires it will go off, same as mana shield, so i would check the buff there too.
Thanks!!
 
Status
Not open for further replies.
Back
Top