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

Triggering abilities via items

Status
Not open for further replies.
Level 5
Joined
Jul 15, 2018
Messages
111
I have a hero ability that has an added effect of turning the team of the targeted unit via triggers. How do I go about modifying the triggers so that it works as an item ability?

Working hero ability (no event):

Conditions
(Ability being cast) Equal to Madness |c0096FF96 [W]|r


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) is A Hero) Equal to False
(Unit-type of (Target unit of ability being cast)) Not equal to |cffd27e00Wife|r
(Unit-type of (Target unit of ability being cast)) Not equal to |cffd27e00Husband|r
(Unit-type of (Target unit of ability being cast)) Not equal to Son
(Unit-type of (Target unit of ability being cast)) Not equal to Daughter
Then - Actions
Unit - Change ownership of (Target unit of ability being cast) to Neutral Hostile and Change color
Else - Actions



I have tried several methods for items, but no luck.

Conditions
(Item-type of (Item being manipulated)) Equal to Rage dust


Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Targeted unit) is A Hero) Equal to False
((Targeted unit) is A structure) Equal to False
(Unit-type of (Target unit of issued order)) Not equal to |cffd27e00Wife|r
(Unit-type of (Target unit of issued order)) Not equal to |cffd27e00Husband|r
(Unit-type of (Target unit of issued order)) Not equal to Son
(Unit-type of (Target unit of issued order)) Not equal to Daughter
Then - Actions
Unit - Change ownership of (Target unit of ability being cast) to Neutral Hostile and Change color
Else - Actions



Thanks in advance
 
I'm fairly certain that you use the "A unit starts the effect of an ability" event even for items.

Edit: Just tested it and it works. All you need to do is create an Item ability and add it to your item. Then in your trigger do this:
  • Cast Item
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Item Ability
    • Actions
      • Player - Set Player 1 (Red) Current gold to 750
 
Last edited:
Status
Not open for further replies.
Back
Top