• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Detecting Ability Being Cast as item ability.

Status
Not open for further replies.
Is an ability being "cast from an item" not the same as an "item being used"?

Not really. Town Portal for example has cast time. The item only gets "used" until the ability has finished. Those events also provide different event responses. I believe charges are already subtracted on "use" etc.

What I was referring to, though, was whether TC meant the ability property "Is an item ability", which holds no gameplay effects afaik.
 
Is Item Ability (Boolean)

No but as I said before, the only way to do that is to save it into a hashtable. So like this...
  • Item abilities
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set IsAbilItem = (Last created hashtable)
      • Set TempAbil = Blink (Item Version)
      • Custom script: call SaveBoolean( udg_IsAbilItem, udg_TempAbil, 0, true )
  • ItemAbil Boolean Check
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set TempAbil = (Ability being cast)
      • Custom script: set udg_TempBoolean = LoadBoolean( udg_IsAbilItem, udg_TempAbil, 0 )
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempBoolean Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: ITEM ABIL!
        • Else - Actions
A quick lil demo of this is here View attachment IsItemAbil.w3x
 
Status
Not open for further replies.
Back
Top