• 🏆 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!

Make a unit to repair if he isnt doing anything

Status
Not open for further replies.
Level 1
Joined
Jan 29, 2009
Messages
6
Hi, I'd like help creating a trigger that makes my unit automatically repair a building if he hasn't already got an order, or if that order is stop.
  • Auto Build
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Buildings[2] = (Units of type House)
      • Set Buildings[3] = (Units of type Warrior House)
      • Set Buildings[4] = (Units of type Hero Altar)
      • Set Buildings[5] = (Units of type Barracks)
      • Set Buildings[6] = (Units of type Catapult)
      • Set Buildings[7] = (Units of type Heavy Tower)
      • Set Buildings[8] = (Units of type Tower)
      • Set Buildings[9] = (Units of type Wall)
      • Set Buildings[10] = (Units of type Well)
      • Set Buildings[11] = (Units of type Market)
      • Set Buildings[12] = (Units of type Warehouse)
      • Unit - Order (Random unit from (Units of type Male Basic)) to Human Peasant - Repair (Random unit from Buildings[(Random integer number between 1 and 12)])
      • Unit - Order (Random unit from (Units of type Female Basic)) to Human Peasant - Repair (Random unit from Buildings[(Random integer number between 1 and 12)])
      • Unit Group - Remove all units of Buildings[1] from Buildings[1]
      • Unit Group - Remove all units of Buildings[6] from Buildings[6]
      • Unit Group - Remove all units of Buildings[11] from Buildings[11]
      • Unit Group - Remove all units of Buildings[2] from Buildings[2]
      • Unit Group - Remove all units of Buildings[12] from Buildings[12]
      • Unit Group - Remove all units of Buildings[5] from Buildings[5]
      • Unit Group - Remove all units of Buildings[10] from Buildings[10]
      • Unit Group - Remove all units of Buildings[4] from Buildings[4]
      • Unit Group - Remove all units of Buildings[9] from Buildings[9]
      • Unit Group - Remove all units of Buildings[8] from Buildings[8]
      • Unit Group - Remove all units of Buildings[7] from Buildings[7]
      • Unit Group - Remove all units of Buildings[3] from Buildings[3]
That is what i have at the moment, it makes a random unit (female basic and male basic) automatically target a building and repair it every second, the problem is the unit doesn't have enough time to completely repair the building before moving on to a different target.
If anybody could help that would be great.
 
Status
Not open for further replies.
Top