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

Trigger Fixes and queries

Status
Not open for further replies.
Level 2
Joined
Feb 22, 2008
Messages
15
To start off, I'd like to thank everyone who has helped me so far with my triggers you've been a big help and I've learned alot based on what you have said and the tutorials you pointed me towards.

However I have once again become stumped so I'll start with the triggers already done that I'm having issues with.

My map has Control points and when capturing a control point I desired it to show the capturing, I found a good tutorial that I opened up and mimiced, however after setting two of my capture points I have the issue that now one team automatically captures one of the points, the other team capturing the 2nd one, and the third staying neutral at start as intended. I can't figure out why the point is changing ownership at start as if it is being capped os the only thing I can think of is that their is something in the origional Trigger that causes it to change ownership at start.

Link to the Control Point tutorial I used is here Capture Control Point System 1.0 - The Hive Workshop - A Warcraft III Modding Site

My trigger for the Control point is here

  • Init
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set ControlPoint[1] = Control Point 0146 <gen>
      • Set ControlPoint[2] = Control Point 0145 <gen>
      • Set ControlPoint[3] = Control Point 0147 <gen>
      • Set ControlPoint[4] = Control Point 0149 <gen>
      • Set ControlPoint[5] = Control Point 0125 <gen>
      • Set ControlPoint[6] = Control Point 0148 <gen>
      • Set ControlPoint[7] = Control Point 0144 <gen>
      • Set NumberOfCaps = 7
      • For each (Integer A) from 2 to 6, do (Actions)
        • Loop - Actions
          • Player Group - Add (Player((Integer A))) to Alliance
          • Player - Make (Player((Integer A))) treat Player 1 (Red) as an Ally with shared vision
      • For each (Integer A) from 8 to 12, do (Actions)
        • Loop - Actions
          • Player Group - Add (Player((Integer A))) to Scourage
          • Player - Make (Player((Integer A))) treat Player 7 (Green) as an Ally with shared vision
      • For each (Integer A) from 1 to 7, do (Actions)
        • Loop - Actions
          • Unit - Set the custom value of ControlPoint[(Integer A)] to (Integer A)
          • Set Progress[(Integer A)] = 50.00
          • Set Capped[(Integer A)] = 0
      • Trigger - Turn on Update <gen>
      • Set Progress[2] = 100.00
      • Set Progress[3] = 0.00
The Update Trigger is
  • Update
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to NumberOfCaps, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of ControlPoint[(Integer A)])
          • Set TempGroup = (Units within 600.00 of TempPoint matching (((Owner of (Matching unit)) is in Alliance) Equal to True))
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                  • Progress[(Integer A)] Less than 100.00
                • Then - Actions
                  • Set Progress[(Integer A)] = (Progress[(Integer A)] + 1.00)
                • Else - Actions
          • Unit Group - Remove all units from TempGroup
          • Custom script: call DestroyGroup (udg_TempGroup)
          • Set TempGroup = (Units within 600.00 of TempPoint matching (((Owner of (Matching unit)) is in Scourage) Equal to True))
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                  • Progress[(Integer A)] Greater than 0.00
                • Then - Actions
                  • Set Progress[(Integer A)] = (Progress[(Integer A)] - 1.00)
                • Else - Actions
          • Unit Group - Remove all units from TempGroup
          • Custom script: call DestroyGroup (udg_TempGroup)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Progress[(Integer A)] Equal to 50.00
            • Then - Actions
              • Floating Text - Destroy FT[(Integer A)]
              • Floating Text - Create floating text that reads |cffffcc00Neutral|r at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Set FT[(Integer A)] = (Last created floating text)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Progress[(Integer A)] Greater than 75.00
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Progress[(Integer A)] Equal to 100.00
                      • Capped[(Integer A)] Not equal to 1
                    • Then - Actions
                      • Set Capped[(Integer A)] = 1
                      • Unit - Change color of ControlPoint[(Integer A)] to Red
                      • Game - Display to (All players) for 10.00 seconds the text: (|cff32cd32Alliance|r has captured + ((Name of ControlPoint[(Integer A)]) + !))
                      • Floating Text - Destroy FT[(Integer A)]
                      • Floating Text - Create floating text that reads (|cff32cd32Alliance|r:|n + (- + ((String((Integer((((Progress[(Integer A)] - 50.00) / 50.00) x 100.00))))) + % Captured))) at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Set FT[(Integer A)] = (Last created floating text)
                    • Else - Actions
                      • Floating Text - Destroy FT[(Integer A)]
                      • Floating Text - Create floating text that reads (|cff32cd32Alliance|r:|n + (- + ((String((Integer((((Progress[(Integer A)] - 50.00) / 50.00) x 100.00))))) + % Captured))) at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Set FT[(Integer A)] = (Last created floating text)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Progress[(Integer A)] Less than 25.00
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Progress[(Integer A)] Equal to 0.00
                          • Capped[(Integer A)] Not equal to 2
                        • Then - Actions
                          • Set Capped[(Integer A)] = 2
                          • Unit - Change color of ControlPoint[(Integer A)] to Green
                          • Game - Display to (All players) for 10.00 seconds the text: (|cffff0000Scourage|r has captured + ((Name of ControlPoint[(Integer A)]) + !))
                          • Floating Text - Destroy FT[(Integer A)]
                          • Floating Text - Create floating text that reads (|cffff0000Scourage|r:|n + (- + ((String((Integer((((50.00 - Progress[(Integer A)]) / 50.00) x 100.00))))) + % Captured))) at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                          • Floating Text - Change (Last created floating text): Disable permanence
                          • Set FT[(Integer A)] = (Last created floating text)
                        • Else - Actions
                          • Floating Text - Destroy FT[(Integer A)]
                          • Floating Text - Create floating text that reads (|cffff0000Scourage|r:|n + (- + ((String((Integer((((50.00 - Progress[(Integer A)]) / 50.00) x 100.00))))) + % Captured))) at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                          • Floating Text - Change (Last created floating text): Disable permanence
                          • Set FT[(Integer A)] = (Last created floating text)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Progress[(Integer A)] Less than or equal to 75.00
                          • Progress[(Integer A)] Greater than or equal to 25.00
                        • Then - Actions
                          • Floating Text - Destroy FT[(Integer A)]
                          • Floating Text - Create floating text that reads |cffffcc00Contested... at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                          • Floating Text - Change (Last created floating text): Disable permanence
                          • Unit - Change color of ControlPoint[(Integer A)] to Black
                          • Set FT[(Integer A)] = (Last created floating text)
                          • Set Capped[(Integer A)] = 0
                        • Else - Actions
          • Custom script: call RemoveLocation (udg_TempPoint)
My second issue is my map has a creep I wish to level up every X ammount of seconds, My first Idea was to make it a self affecting aura that each creep had and increase the level of the aura every X ammount of seconds. This did not work. I neeed to find some way to increase the stats of the creep every X ammount of seconds.

The Third Trigger I had was an All Random System at which I set the different Heroes to a Variable and then had it pick and give the hero a random hero, however I'm not sure on two things, One my system is not infallible as it will occasionally give the same hero to two people, and Two when the repick trigger is used it does not delete the previous unit.

My question there is what do I need to add to these two triggers to prevent multible randoms and delete the hero already given from the pick (Im not sure how to delete a unit thats not on the field already)

Now for the Triggers I have no clue how to make.

I need to know how to make a trigger look for the unit having an itemtype in inventory for the condition.

Now the Item Triggers themselves

I have a Trigger thats somewhat like life steal, but in a different manner, It gives X% of killed targets total Life to the user life.

I need to know how to give Players +x% extra bounty per kill as an item effect.

I need to know create my own Aura, and make a variable to heroes on the map that are selected (so that a skill may target them randomly).

If you could help me with any of this it would be GREATLY appreciated, Thanks!
 
Level 2
Joined
Feb 22, 2008
Messages
15
The Problem I am having Lies within the Trigger on the Control Point Trigger, I tested the map and it does the exact same thing.
 
Status
Not open for further replies.
Top