• 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 to make repair limited to 1 unit per bulding

Status
Not open for further replies.
Level 5
Joined
Apr 26, 2009
Messages
92
Hi!
I was wondering if there was a way i could make it that makes it so only one unit can repair a building at a time to make unfair repairing possible.
thanks!
 
Maybe do this:
  • Events
  • A unit Begins casting an ability/Starts the effect of an ability
  • Conditons
  • (Ability being cast) Equal to Repair/Repair Human
  • Actions
  • Set Repairing_Unit = 1
  • Then other actions here
This is for making the repairer stop:
  • Events
  • A unit Begins casting an ability/Starts the effect of an ability
  • Conditons
  • (Ability being cast) Equal to Repair/Repair Human
  • Repairing_Unit Greater than 1
  • Actions
  • Set Repairer = (Triggering Unit)
  • Unit - Order Repairer to Stop
  • Then other actions here
Im not sure if it works though.
 
Level 6
Joined
Oct 10, 2009
Messages
1,426
^^that would probably work blind man but you need to reset Repairing_unit back to 1 afterwards. and then, you'd need a third trigger to do,
  • Events
    • Unit - A unit finishes the effect of an ability
    • Unit - A unit stops the effect of an ability
  • Conditions
    • (Ability being cast) equal to Repair
  • Actions
    • Set Repairing_Unit = 0
 
Status
Not open for further replies.
Top