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

[Solved] Claim/Release Base

Status
Not open for further replies.
Level 11
Joined
Jun 20, 2017
Messages
380
These triggers worked before, But they do not work anymore!? Also is there leaks?
  • Claim Base
    • Events
      • Unit - A unit Begins construction
    • Conditions
      • (Unit-type of (Constructing structure)) Equal to (==) Obelisk
    • Actions
      • Set UnitGroup = (Units owned by (Player((Player number of (Picked player)))) matching (((Matching unit) is in UnitGroup_Humans) Equal to (==) True))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Multiple ConditionsOr - Any (Conditions) are true
                • Conditions
                  • (Rect 014 <gen> contains (Picked unit)) Equal to (==) True
                  • (Rect 014a <gen> contains (Picked unit)) Equal to (==) True
                  • (Rect 014b <gen> contains (Picked unit)) Equal to (==) True
            • Then - Actions
              • Set Integer_ClaimBase = 1
            • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 015 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 015a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 2
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 016 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 016a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 3
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 017 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 017a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 4
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 018 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 018a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 5
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 019 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 019a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 6
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 020 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 020a <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 020b <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 7
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 020 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 021a <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 021b <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 8
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 022 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 022a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 9
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 023 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 023a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 10
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 024 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 024a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 11
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 025 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 025a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 12
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 026 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 026a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 13
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 027 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 027a <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 027b <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 14
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 027 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 028a <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 028b <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 15
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 029 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 029a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 16
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 030 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 030a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 17
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 031 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 031a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 18
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 032 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 032a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 19
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 033 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 033a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 20
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 034 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 034a <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 034b <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 21
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 034 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 035a <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 035b <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 22
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 036 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 036a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 23
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 037 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 037a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 24
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 038 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 038a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 25
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 039 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 039a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 26
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 040 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 040a <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 27
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Multiple ConditionsOr - Any (Conditions) are true
                  • Conditions
                    • (Rect 014 <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 041a <gen> contains (Picked unit)) Equal to (==) True
                    • (Rect 042 <gen> contains (Picked unit)) Equal to (==) True
              • Then - Actions
                • Set Integer_ClaimBase = 28
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Integer_Claim[((Player number of (Picked player)) - 1)] Equal to (==) 0
                • Integer_Claim[0] Not equal to (!=) Integer_ClaimBase
                • Integer_Claim[1] Not equal to (!=) Integer_ClaimBase
                • Integer_Claim[2] Not equal to (!=) Integer_ClaimBase
                • Integer_Claim[3] Not equal to (!=) Integer_ClaimBase
                • Integer_Claim[4] Not equal to (!=) Integer_ClaimBase
                • Integer_Claim[5] Not equal to (!=) Integer_ClaimBase
                • Integer_Claim[6] Not equal to (!=) Integer_ClaimBase
                • Integer_Claim[7] Not equal to (!=) Integer_ClaimBase
                • Integer_Claim[8] Not equal to (!=) Integer_ClaimBase
                • Integer_Claim[9] Not equal to (!=) Integer_ClaimBase
              • Then - Actions
                • Set Integer_Claim[((Player number of (Picked player)) - 1)] = Integer_ClaimBase
                • Game - Display to PlayerGroup_Humans the text: ((String_PlayerColors[(Player number of (Picked player))] + has claimed base ) + ((String(Integer_ClaimBase)) + .))
              • Else - Actions
          • -------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// --------
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Boolean_Claim[0] Equal to (==) True
                • Player_Claim[0] Not equal to (!=) (Owner of (Picked unit))
                • Player_Claim[1] Not equal to (!=) (Owner of (Picked unit))
                • Player_Claim[2] Not equal to (!=) (Owner of (Picked unit))
                • Player_Claim[3] Not equal to (!=) (Owner of (Picked unit))
                • Player_Claim[4] Not equal to (!=) (Owner of (Picked unit))
                • Player_Claim[5] Not equal to (!=) (Owner of (Picked unit))
                • Player_Claim[6] Not equal to (!=) (Owner of (Picked unit))
                • Player_Claim[7] Not equal to (!=) (Owner of (Picked unit))
                • Player_Claim[8] Not equal to (!=) (Owner of (Picked unit))
                • Player_Claim[9] Not equal to (!=) (Owner of (Picked unit))
              • Then - Actions
                • Unit - Set (Picked unit) construction progress to 0%
                • Game - Display to PlayerGroup_Humans the text: (String_PlayerColors[(Player number of (Picked player))] + this base already claimed.)
              • Else - Actions
      • Custom script: call DestroyGroup(udg_UnitGroup)
  • Release Base
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to (==) Obelisk
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Integer_Claim[((Player number of (Triggering player)) - 1)] Not equal to (!=) 0
        • Then - Actions
          • Set Integer_Claim[((Player number of (Triggering player)) - 1)] = 0
          • Game - Display to PlayerGroup_Humans the text: ((String_PlayerColors[(Player number of (Triggering player))] + has unclaimed base ) + ((String(Integer_ClaimBase)) + .))
        • Else - Actions
 
  • Set UnitGroup = (Units owned by (Player((Player number of (Picked player)))) matching (((Matching unit) is in UnitGroup_Humans) Equal to (==) True))
(Picked Player) wouldn't refer to anything, since it does not come from a For Player Group Action. Instead, the function (Triggering Player) would be more appropriate to use.
 
Level 11
Joined
Jun 20, 2017
Messages
380
  • In Game
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Unit-type of (Entering unit)) Equal to (==) Builder (Male)) or ((Unit-type of (Entering unit)) Equal to (==) Builder (Female))
        • Then - Actions
          • Unit Group - Add (Entering unit) to UnitGroup_Humans
          • Set Integer_InGameHumans = (Integer_InGameHumans + 1)
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Multiple ConditionsOr - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Entering unit)) Equal to (==) Illidan
              • (Unit-type of (Entering unit)) Equal to (==) Illidan (Evil)
              • (Unit-type of (Entering unit)) Equal to (==) Arthas (Evil)
              • (Unit-type of (Entering unit)) Equal to (==) Kil'jaeden (Evil)
              • (Unit-type of (Entering unit)) Equal to (==) Vengeance (Evil)
              • (Unit-type of (Entering unit)) Equal to (==) Balnazzar (Evil)
        • Then - Actions
          • Unit Group - Add (Entering unit) to UnitGroup_Vampires
          • Set Integer_InGameVampires = (Integer_InGameVampires + 1)
        • Else - Actions
 
Status
Not open for further replies.
Top