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

Detecting Ability Being Cast as item ability.

Status
Not open for further replies.
Level 13
Joined
Sep 29, 2008
Messages
672
As I said as a "condition".

let's say you made a trigger that everytime a hero casts a spell they are silenced.
if i use unit - starts the effect of an ability, it also works with item abilities.
that's y i was asking for condition to be able to negate items spells from triggering that event.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
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.
Top