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

Allied units won't repair/finish building my buildings when ordered through trigger

Level 2
Joined
Nov 3, 2021
Messages
11
I've made a simple trigger that orders my and allied peons to go repair/finish building any structure that is under 100 % HP.
Works perfectly normal for my peons, but allied peons will simply refuse to do it.
It's not a LoS/Them not getting the order though the trigger, because if I change it to move/right-click/attack they will go to the building and do the desired order.
The buildings have 0 repair and build costs and I've modified the Repair (Human) ability by also checking the (Allied) in targets allowed.
Any idea why this happens, is it just a quirk?

  • Build or Repair Orders
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Orc Outpost (Built Structure)
              • (Percentage life of (Picked unit)) Less than 100.00
            • Then - Actions
              • Set TempUnit = (Picked unit)
              • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of (Picked unit)) Equal to Peon
                      • (Custom value of (Picked unit)) Equal to 0
                    • Then - Actions
                      • Game - Display to (All players) the text: AAAAAUGH
                      • Unit - Order (Picked unit) to Human Peasant - Repair TempUnit
                      • Unit - Set the custom value of (Picked unit) to 1
                    • Else - Actions
            • Else - Actions
Don't worry about the trigger structure, coherence, leaks or anything else, this is just purely for testing out the peon behavior.
 
Level 18
Joined
Mar 16, 2008
Messages
721
You mean repair like finish construction? I'd suspect only you can finish construction of your own structures. Maybe try changing ownership of either the structure or builder or both, then change back when structures completes?
 
Level 20
Joined
Aug 29, 2012
Messages
841
That might be a dumb question but did you give Repair (Human) to the peons? It seems the game differenciates Orc/Human repair abilities

Also, did you try this order? Who knows, it might be some of those classic world edit shenanigans that need to be super specific :p

1690113244433.png
 
Level 2
Joined
Nov 3, 2021
Messages
11
Perhaps try this instead:
  • Unit - Order (Picked unit) to Right-Click TempUnit
That might be a dumb question but did you give Repair (Human) to the peons? It seems the game differenciates Orc/Human repair abilities

Also, did you try this order? Who knows, it might be some of those classic world edit shenanigans that need to be super specific :p

View attachment 441472
I tried both, it didn't work. For the first the peon goes there but then just stands there... menacingly. As for the second it works the same as if it were Repair-Human, my Peon can works on it, the others can't.
You mean repair like finish construction? I'd suspect only you can finish construction of your own structures. Maybe try changing ownership of either the structure or builder or both, then change back when structures completes?
This works, it's kind of ass though, as now my Peon WON'T work on it. I guess it's hardcoded that an ally can't finish constructing your buldings even though they cost or have a repair cost of 0 gold/lumber.
 
Top