• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Trigger] how to give all heros an item ?

Status
Not open for further replies.
Level 2
Joined
Aug 6, 2009
Messages
15
is there a way to give every hero an item ?


also how do i make a trigger so that whenever a unit dies in region A a unit will spawn in region B?
 
Level 9
Joined
Aug 2, 2008
Messages
219
Pretty easy
  • Give Heros Items
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Hero - Create {YOUR ITEM} and give it to (Triggering unit)
  • Spawn In Region
    • Events
      • Unit - A unit Dies
    • Conditions
      • ({REGION A} contains (Triggering unit)) Equal to True
    • Actions
      • Set Anti_Location_Leak = (Center of {REGION B})
      • Unit - Create 1 {YOUR UNIT TYPE} for Player {YOUR PLAYER} at Anti_Location_Leak facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Anti_Location_Leak)
 
Level 7
Joined
Oct 13, 2008
Messages
300
  • Item
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Hero - Create Tome of Experience and give it to (Picked unit))
 
Level 4
Joined
Jan 29, 2007
Messages
98
Don't use the above one (No offence, Duhcake) as it leaks... Use this:
  • Give Items
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Hero - Create Tome of Experience and give it to (Picked unit)
      • Custom script: call DestroyGroup(udg_TempGroup)
 
Status
Not open for further replies.
Top