• 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.

Why do my peasants not Storm Bolt their Tents? "Return To Tents"

Status
Not open for further replies.
Level 7
Joined
Jul 20, 2009
Messages
295
These are the triggers, and I need someone to help me out:
  • Create Unit
    • Events
    • Conditions
    • Actions
      • -------- ============================== --------
      • -------- Repair Buildings --------
      • -------- ============================== --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) is A structure) Equal to True
        • Then - Actions
          • For each (Integer IntegerRepair) from 7 to 10, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Attacked unit)) Equal to IntegerRepair
                  • Buildings_Repair[IntegerRepair] Equal to False
                • Then - Actions
                  • Set Buildings_Repair[IntegerRepair] = True
                  • Set Temp_Location2 = ((Center of Team1 Tent 1 <gen>) offset by 150.00 towards 225.00 degrees)
                  • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
                  • Set Buildings_Repairer[(Custom value of (Attacked unit))] = (Last created unit)
                  • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
                • Else - Actions
          • For each (Integer IntegerRepair) from 11 to 13, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Attacked unit)) Equal to IntegerRepair
                  • Buildings_Repair[IntegerRepair] Equal to False
                • Then - Actions
                  • Set Buildings_Repair[IntegerRepair] = True
                  • Set Temp_Location2 = ((Center of Team1 Tent 2 <gen>) offset by 150.00 towards 225.00 degrees)
                  • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
                  • Set Buildings_Repairer[(Custom value of (Attacked unit))] = (Last created unit)
                  • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
                • Else - Actions
          • For each (Integer IntegerRepair) from 14 to 17, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Attacked unit)) Equal to IntegerRepair
                  • Buildings_Repair[IntegerRepair] Equal to False
                • Then - Actions
                  • Set Buildings_Repair[IntegerRepair] = True
                  • Set Temp_Location2 = ((Center of Team1 Tent 3 <gen>) offset by 150.00 towards 225.00 degrees)
                  • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
                  • Set Buildings_Repairer[(Custom value of (Attacked unit))] = (Last created unit)
                  • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
                • Else - Actions
          • For each (Integer IntegerRepair) from 18 to 20, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Attacked unit)) Equal to IntegerRepair
                  • Buildings_Repair[IntegerRepair] Equal to False
                • Then - Actions
                  • Set Buildings_Repair[IntegerRepair] = True
                  • Set Temp_Location2 = ((Center of Team1 Tent 4 <gen>) offset by 150.00 towards 225.00 degrees)
                  • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
                  • Set Buildings_Repairer[(Custom value of (Attacked unit))] = (Last created unit)
                  • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
                • Else - Actions
          • For each (Integer IntegerRepair) from 21 to 22, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Attacked unit)) Equal to IntegerRepair
                  • Buildings_Repair[IntegerRepair] Equal to False
                • Then - Actions
                  • Set Buildings_Repair[IntegerRepair] = True
                  • Set Temp_Location2 = ((Center of Team1 Tent 5 <gen>) offset by 150.00 towards 225.00 degrees)
                  • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
                  • Set Buildings_Repairer[(Custom value of (Attacked unit))] = (Last created unit)
                  • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
                • Else - Actions
          • For each (Integer IntegerRepair) from 23 to 24, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Attacked unit)) Equal to IntegerRepair
                  • Buildings_Repair[IntegerRepair] Equal to False
                • Then - Actions
                  • Set Buildings_Repair[IntegerRepair] = True
                  • Set Temp_Location2 = ((Center of Team1 Tent 6 <gen>) offset by 150.00 towards 225.00 degrees)
                  • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
                  • Set Buildings_Repairer[(Custom value of (Attacked unit))] = (Last created unit)
                  • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Attacked unit)) Equal to 25
              • Buildings_Repair[25] Equal to False
            • Then - Actions
              • Set Buildings_Repair[25] = True
              • Set Temp_Location2 = ((Center of Team1 Tent 5 <gen>) offset by 150.00 towards 225.00 degrees)
              • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
              • Custom script: call GroupAddUnit (udg_Repairing, bj_lastCreatedUnit)
              • Set Buildings_Repairer[(Custom value of (Attacked unit))] = (Last created unit)
              • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
              • Custom script: call RemoveLocation(udg_Temp_Location2)
              • Set Temp_Location2 = ((Center of Team1 Tent 6 <gen>) offset by 150.00 towards 225.00 degrees)
              • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
              • Set Buildings_Repairer[((Custom value of (Attacked unit)) + 1)] = (Last created unit)
              • Unit - Set the custom value of (Last created unit) to ((Custom value of (Attacked unit)) + 1)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Attacked unit)) Equal to 32
              • Buildings_Repair[32] Equal to False
            • Then - Actions
              • Set Buildings_Repair[32] = True
              • Set Temp_Location2 = ((Center of Team1 Tent 5 <gen>) offset by 150.00 towards 225.00 degrees)
              • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
              • Set Buildings_Repairer[(Custom value of (Attacked unit))] = (Last created unit)
              • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Attacked unit)) Equal to 33
              • Buildings_Repair[33] Equal to False
            • Then - Actions
              • Set Buildings_Repair[33] = True
              • Set Temp_Location2 = ((Center of Team1 Tent 6 <gen>) offset by 150.00 towards 225.00 degrees)
              • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
              • Set Buildings_Repairer[(Custom value of (Attacked unit))] = (Last created unit)
              • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Attacked unit)) Equal to 34
              • Buildings_Repair[34] Equal to False
            • Then - Actions
              • Set Buildings_Repair[34] = True
              • Set Temp_Location2 = ((Center of Team1 Tent 5 <gen>) offset by 150.00 towards 225.00 degrees)
              • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
              • Custom script: call GroupAddUnit (udg_Repairing, bj_lastCreatedUnit)
              • Set Buildings_Repairer[(Custom value of (Attacked unit))] = (Last created unit)
              • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
              • Custom script: call RemoveLocation(udg_Temp_Location2)
              • Set Temp_Location2 = ((Center of Team1 Tent 6 <gen>) offset by 150.00 towards 225.00 degrees)
              • Unit - Create 1 Engineer for Player 11 (Dark Green) at Temp_Location2 facing 225.00 degrees
              • Set Buildings_Repairer[((Custom value of (Attacked unit)) + 1)] = (Last created unit)
              • Unit - Set the custom value of (Last created unit) to ((Custom value of (Attacked unit)) + 1)
            • Else - Actions
          • Custom script: call GroupAddUnit (udg_Repairing, bj_lastCreatedUnit)
          • Custom script: call RemoveLocation(udg_Temp_Location2)
          • Unit - Create 1 Swordsman for Neutral Passive at (Center of Region 110 <gen>) facing Default building facing degrees
          • Unit - Set the custom value of (Last created unit) to (Custom value of (Attacked unit))
          • Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
          • Trigger - Turn on Stop Repair <gen>
        • Else - Actions
  • Order To Repair
    • Events
      • Unit - A unit owned by Neutral Passive Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Swordsman
    • Actions
      • For each (Integer IntegerRepair) from 7 to 24, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Dying unit)) Equal to IntegerRepair
            • Then - Actions
              • Unit - Order Buildings_Repairer[(Custom value of (Dying unit))] to Human Peasant - Repair Buildings_Towers[(Custom value of (Dying unit))]
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Dying unit)) Equal to 25
        • Then - Actions
          • Unit - Order Buildings_Repairer[(Custom value of (Dying unit))] to Human Peasant - Repair Buildings_Towers[(Custom value of (Dying unit))]
          • Unit - Order Buildings_Repairer[((Custom value of (Dying unit)) + 1)] to Human Peasant - Repair Buildings_Towers[(Custom value of (Dying unit))]
        • Else - Actions
      • For each (Integer IntegerRepair) from 32 to 33, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Dying unit)) Equal to IntegerRepair
            • Then - Actions
              • Unit - Order Buildings_Repairer[(Custom value of (Dying unit))] to Human Peasant - Repair Buildings_Towers[(Custom value of (Dying unit))]
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Dying unit)) Equal to 34
        • Then - Actions
          • Unit - Order Buildings_Repairer[(Custom value of (Dying unit))] to Human Peasant - Repair Buildings_Towers[(Custom value of (Dying unit))]
          • Unit - Order Buildings_Repairer[((Custom value of (Dying unit)) + 1)] to Human Peasant - Repair Buildings_Towers[(Custom value of (Dying unit))]
        • Else - Actions
  • Stop Repair
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Repairing and do (Actions)
        • Loop - Actions
          • Custom script: if GetUnitCurrentOrder(GetEnumUnit()) != 852024 then
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Custom value of (Picked unit)) Equal to 7
                  • (Custom value of (Picked unit)) Equal to 8
                  • (Custom value of (Picked unit)) Equal to 9
                  • (Custom value of (Picked unit)) Equal to 10
            • Then - Actions
              • Custom script: call IssueTargetOrderBJ( GetEnumUnit(), "thunderbolt", udg_Buildings_Towers[26] )
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Custom value of (Picked unit)) Equal to 11
                      • (Custom value of (Picked unit)) Equal to 12
                      • (Custom value of (Picked unit)) Equal to 13
                • Then - Actions
                  • Custom script: call IssueTargetOrderBJ( GetEnumUnit(), "thunderbolt", udg_Buildings_Towers[27] )
                • Else - Actions
          • Unit Group - Remove (Picked unit) from Repairing
          • Custom script: endif
  • Remove
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Return To Tent
    • Actions
      • Unit - Remove (Triggering unit) from the game
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Not equal to 26
          • (Custom value of (Triggering unit)) Not equal to 35
        • Then - Actions
          • Set Buildings_Repair[(Custom value of (Triggering unit))] = False
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Repairing is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off Stop Repair <gen>
        • Else - Actions
If anything you do not understand about the triggers, you can ask.
-Though this is what is and supposed to be happening, when a Tower takes damage, (Buildings_Towers[7-25, 32-34]) an Engineer appears from Tents (Buildings_Towers[26-31]), repairs the damaged tower until they stop repairing, then they cast storm bolt (Return To Tent) ability on their Tents, and get removed from game. Each Engineer is given the custom value of the Tower's custom value.
-Engineers are controlled by comps, Engineers and tents are invulnerable.
-I tried making an Engineer under my control and cast Return To Tent, and it worked fine + removed the Engineer, it seems that the only trigger that doesn't work is the 3rd one. Engineers also do appear when Towers takes damage.
 
Level 7
Joined
Jul 20, 2009
Messages
295
Could you post the map?

Sure, here.
Though, abit more actions are added to the triggers for Team 2, and the triggers' name are different also.
The four Triggers:
1-Building Repair
2-Building Repair Order T1
3-Building Stop Repair
4-Building Repair Removement

First 2 are under the Folder, ActionDetectionSystem
and the second 2 are under, Buildings
 

Attachments

  • FFWF! (V1.01).w3x
    4.3 MB · Views: 38
Level 37
Joined
Mar 6, 2006
Messages
9,243
Sorry but it takes too long time to get familiar with the map for proper debugging.

You can try this trigger to see whether the units get the ability order and if they are given an order that overrides the cast:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads (String((Issued order))) above (Triggering unit) with Z offset 0.00, using font size 10.00...
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
 
Level 7
Joined
Jul 20, 2009
Messages
295
Sorry but it takes too long time to get familiar with the map for proper debugging.

You can try this trigger to see whether the units get the ability order and if they are given an order that overrides the cast:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads (String((Issued order))) above (Triggering unit) with Z offset 0.00, using font size 10.00...
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds

Ok, at least do you know why a spell is given the name, Default String instead of it's name? (It does have a name) or, how to make a caster of channel has its buff?

And, nothing happens/appears after a floating text shows up with the word, "Repair" dunno if that's helpful :S
 
Man, Maker is right. Map has ton of bugs, and its hard to quickly get what's going aroud. When you post map, you should ensure it's good map for testing. So, I recommend creating new map, paste to it only triggers that you need help with, and give us possibility to have triggered/manipulated units/objects on map ground already, so testing won't take much time.

You have already started similar thread. I gave you MUI mini repair system, and it works fine, even now I see that its still what you need.

Btw, what Maker shown you is piece of Debugging art. Creating messages/floating test which should display data you actually need in right moment will tell you if your trigger works right or not. It's great for checking step by step every part of code because if you are patient it gives high chance to fix problems by your own.
 
Status
Not open for further replies.
Top