• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[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))
 
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
 
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.
Back
Top