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

How do I apply trigger to a hero just bought from a Tavern?

Status
Not open for further replies.
Level 20
Joined
Oct 21, 2006
Messages
3,230
  • Pick Hero
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Hero[(Player number of (Owner of (Buying unit)))] = (Sold unit)
  • Move Backpack
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Backpack) and do (Actions)
        • Loop - Actions
          • Set Point = (Position of Hero[(Player number of (Owner of (Picked unit)))])
          • Unit - Move (Picked unit) instantly to Point
          • Custom script: call RemoveLocation(udg_Point)
 
Level 8
Joined
Apr 17, 2008
Messages
212
  • Pick Hero
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Hero[(Player number of (Owner of (Buying unit)))] = (Sold unit)
  • Move Backpack
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Backpack) and do (Actions)
        • Loop - Actions
          • Set Point = (Position of Hero[(Player number of (Owner of (Picked unit)))])
          • Unit - Move (Picked unit) instantly to Point
          • Custom script: call RemoveLocation(udg_Point)

You could just use tiggering unit? Meh, tnx :p
 
Status
Not open for further replies.
Top