• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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,231
  • 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