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

[Trigger] Need help making a trigger that gives a hero +2 agility when a neutral creep dies

Status
Not open for further replies.
Level 1
Joined
Oct 11, 2014
Messages
3
Need help making a trigger that gives a hero +2 agility when a neutral creep with a buff dies.
I'm kind of new to this but this is what I've done so far:

  • Da Trigger
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • ((Dying unit) has buff Da buff) Equal to True
    • Actions
      • Unit Group - Pick every unit in (Units of type Da Hero) and do (Hero - Create Da agi gain tome and give it to (Picked unit))
 
Level 12
Joined
Oct 16, 2010
Messages
680
why don't u simply use - Hero - add x agi to Da Hero?

also dying unit doesen't have buffs afaik:/

I think what you need to do, is put every unit in a global unit group when the buff is applied and remove the unit from the group after x sec(the buffs duration).

and when a unit dies u search if the unit exist in the group. if so , you know what to do
 
Level 4
Joined
Jan 3, 2013
Messages
69
Juuuust in case you don't know how to use hashtables or indexing, you can make the buff to be the Parasite one, so when the unit with the Parasite buff dies, it will spawn a specific Dummy Unit and you can easily check that by "A Unit enters Playable Map Area" and conditioning "Entering Unit equal to Dummy Unit (Parasite)"
 
Status
Not open for further replies.
Top