• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

I'm making an item like this but...

Status
Not open for further replies.
Level 14
Joined
Jul 19, 2007
Messages
774
Helm.png

I'm doing this item from DOTA to my map but there is 2 problems with it. How can I make so the dominated creep is getting 1400 hit points? And I got problem with my creep groups, if I use the domination ability on 1 creep in the neutral creeps group and kill the rest of the creeps units in the group, it wont respawn a new random creep group in that spot after 45 seconds because the dominated creep is still alive :-/ I hope you get what I mean, it's hard to explain for me.
Here is the triggers of the creeps spawning groups...
  • Initialize Camps
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet RespawnCreepTimer = 45.00
      • Set VariableSet CreepCampRespawning1 = False
      • Set VariableSet CreepCampRespawning2 = False
      • Unit Group - Add Lost Soul 0343 <gen> to CreepCampGroup1
      • Unit Group - Add Warrior of the Dead 0344 <gen> to CreepCampGroup1
      • Unit Group - Add Warrior of the Dead 0345 <gen> to CreepCampGroup1
      • Unit Group - Add Warrior of the Dead 0346 <gen> to CreepCampGroup1
      • Unit Group - Add Spider Mistress 0324 <gen> to CreepCampGroup2
      • Unit Group - Add Mirkwood Spider 0333 <gen> to CreepCampGroup2
      • Unit Group - Add Mirkwood Spider 0334 <gen> to CreepCampGroup2
      • Unit Group - Add Mirkwood Spider 0325 <gen> to CreepCampGroup2
  • Camp Death
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in CreepCampGroup1.) Equal to True
        • Then - Actions
          • Unit Group - Remove (Triggering unit) from CreepCampGroup1.
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (All units of CreepCampGroup1 are dead) Equal to True
              • CreepCampRespawning1 Equal to False
            • Then - Actions
              • Set VariableSet CreepCampRespawning1 = True
              • Countdown Timer - Start TimerCreepCamp1 as a One-shot timer that will expire in RespawnCreepTimer seconds
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is in CreepCampGroup2.) Equal to True
        • Then - Actions
          • Unit Group - Remove (Triggering unit) from CreepCampGroup2.
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (All units of CreepCampGroup2 are dead) Equal to True
              • CreepCampRespawning2 Equal to False
            • Then - Actions
              • Set VariableSet CreepCampRespawning2 = True
              • Countdown Timer - Start TimerCreepCamp2 as a One-shot timer that will expire in RespawnCreepTimer seconds
            • Else - Actions
        • Else - Actions
  • Respawn Camp 1
    • Events
      • Time - TimerCreepCamp1 expires
    • Conditions
    • Actions
      • Set VariableSet CreepCampRespawning1 = False
      • Set VariableSet RandomCampInt = (Random integer number between 1 and 10)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomCampInt Equal to 1
        • Then - Actions
          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Boss <gen>)
          • Unit - Create 1 Spider Mistress for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
          • Unit Group - Add (Last created unit) to CreepCampGroup1
          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 1 <gen>)
          • Unit - Create 1 Mirkwood Spider for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
          • Unit Group - Add (Last created unit) to CreepCampGroup1
          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 2 <gen>)
          • Unit - Create 1 Mirkwood Spider for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
          • Unit Group - Add (Last created unit) to CreepCampGroup1
          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 3 <gen>)
          • Unit - Create 1 Mirkwood Spider for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
          • Unit Group - Add (Last created unit) to CreepCampGroup1
          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RandomCampInt Equal to 2
            • Then - Actions
              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Boss <gen>)
              • Unit - Create 1 Corrupted Bear Champion for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
              • Unit Group - Add (Last created unit) to CreepCampGroup1
              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 1 <gen>)
              • Unit - Create 1 Corrupted Bear for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
              • Unit Group - Add (Last created unit) to CreepCampGroup1
              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 2 <gen>)
              • Unit - Create 1 Corrupted Bear for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
              • Unit Group - Add (Last created unit) to CreepCampGroup1
              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 3 <gen>)
              • Unit - Create 1 Corrupted Bear for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
              • Unit Group - Add (Last created unit) to CreepCampGroup1
              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomCampInt Equal to 3
                • Then - Actions
                  • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Boss <gen>)
                  • Unit - Create 1 Warg Rider Captain for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to CreepCampGroup1
                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                  • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 1 <gen>)
                  • Unit - Create 1 Warg for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to CreepCampGroup1
                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                  • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 2 <gen>)
                  • Unit - Create 1 Warg for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to CreepCampGroup1
                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                  • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 3 <gen>)
                  • Unit - Create 1 Warg for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to CreepCampGroup1
                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RandomCampInt Equal to 4
                    • Then - Actions
                      • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Boss <gen>)
                      • Unit - Create 1 Orc Commander for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                      • Unit Group - Add (Last created unit) to CreepCampGroup1
                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                      • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 1 <gen>)
                      • Unit - Create 1 Wild Orc for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                      • Unit Group - Add (Last created unit) to CreepCampGroup1
                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                      • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 2 <gen>)
                      • Unit - Create 1 Wild Orc for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                      • Unit Group - Add (Last created unit) to CreepCampGroup1
                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                      • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 3 <gen>)
                      • Unit - Create 1 Wild Orc for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                      • Unit Group - Add (Last created unit) to CreepCampGroup1
                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RandomCampInt Equal to 5
                        • Then - Actions
                          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Boss <gen>)
                          • Unit - Create 1 Lost Soul for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                          • Unit Group - Add (Last created unit) to CreepCampGroup1
                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 1 <gen>)
                          • Unit - Create 1 Warrior of the Dead for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                          • Unit Group - Add (Last created unit) to CreepCampGroup1
                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 2 <gen>)
                          • Unit - Create 1 Warrior of the Dead for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                          • Unit Group - Add (Last created unit) to CreepCampGroup1
                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 3 <gen>)
                          • Unit - Create 1 Warrior of the Dead for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                          • Unit Group - Add (Last created unit) to CreepCampGroup1
                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RandomCampInt Equal to 6
                            • Then - Actions
                              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Boss <gen>)
                              • Unit - Create 1 Goblin Officier for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 1 <gen>)
                              • Unit - Create 1 Goblin Spearman for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 2 <gen>)
                              • Unit - Create 1 Goblin Spearman for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 3 <gen>)
                              • Unit - Create 1 Goblin Spearman for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • RandomCampInt Equal to 7
                                • Then - Actions
                                  • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Boss <gen>)
                                  • Unit - Create 1 Battle Troll for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                  • Unit Group - Add (Last created unit) to CreepCampGroup1
                                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                  • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 1 <gen>)
                                  • Unit - Create 1 Cave Troll for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                  • Unit Group - Add (Last created unit) to CreepCampGroup1
                                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                  • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 2 <gen>)
                                  • Unit - Create 1 Cave Troll for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                  • Unit Group - Add (Last created unit) to CreepCampGroup1
                                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                  • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 3 <gen>)
                                  • Unit - Create 1 Cave Troll for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                  • Unit Group - Add (Last created unit) to CreepCampGroup1
                                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • RandomCampInt Equal to 8
                                    • Then - Actions
                                      • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Boss <gen>)
                                      • Unit - Create 1 Necromancer for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                      • Unit Group - Add (Last created unit) to CreepCampGroup1
                                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                      • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 1 <gen>)
                                      • Unit - Create 1 Reanimated Soul for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                      • Unit Group - Add (Last created unit) to CreepCampGroup1
                                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                      • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 2 <gen>)
                                      • Unit - Create 1 Reanimated Soul for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                      • Unit Group - Add (Last created unit) to CreepCampGroup1
                                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                      • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 3 <gen>)
                                      • Unit - Create 1 Reanimated Soul for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                      • Unit Group - Add (Last created unit) to CreepCampGroup1
                                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • RandomCampInt Equal to 9
                                        • Then - Actions
                                          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Boss <gen>)
                                          • Unit - Create 1 Wild Hobbit Archer for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                          • Unit Group - Add (Last created unit) to CreepCampGroup1
                                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 1 <gen>)
                                          • Unit - Create 1 Wild Hobbit for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                          • Unit Group - Add (Last created unit) to CreepCampGroup1
                                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 2 <gen>)
                                          • Unit - Create 1 Wild Hobbit for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                          • Unit Group - Add (Last created unit) to CreepCampGroup1
                                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                          • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 3 <gen>)
                                          • Unit - Create 1 Wild Hobbit for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                          • Unit Group - Add (Last created unit) to CreepCampGroup1
                                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • RandomCampInt Equal to 10
                                            • Then - Actions
                                              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Boss <gen>)
                                              • Unit - Create 1 Thief Mage for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 1 <gen>)
                                              • Unit - Create 1 Thief for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 2 <gen>)
                                              • Unit - Create 1 Thief for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                              • Set VariableSet TempPointCreepCamp = (Center of Camp 1 Normal Creep 3 <gen>)
                                              • Unit - Create 1 Thief for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                            • Else - Actions
  • Respawn Camp 2
    • Events
      • Time - TimerCreepCamp2 expires
    • Conditions
    • Actions
      • Set VariableSet CreepCampRespawning2 = False
      • Set VariableSet RandomCampInt = (Random integer number between 1 and 9)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomCampInt Equal to 1
        • Then - Actions
          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Boss <gen>)
          • Unit - Create 1 Spider Mistress for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
          • Unit Group - Add (Last created unit) to CreepCampGroup2
          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 3 <gen>)
          • Unit - Create 1 Mirkwood Spider for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
          • Unit Group - Add (Last created unit) to CreepCampGroup2
          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 2 <gen>)
          • Unit - Create 1 Mirkwood Spider for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
          • Unit Group - Add (Last created unit) to CreepCampGroup2
          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 1 <gen>)
          • Unit - Create 1 Mirkwood Spider for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
          • Unit Group - Add (Last created unit) to CreepCampGroup2
          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RandomCampInt Equal to 2
            • Then - Actions
              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Boss <gen>)
              • Unit - Create 1 Corrupted Bear Champion for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
              • Unit Group - Add (Last created unit) to CreepCampGroup2
              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 3 <gen>)
              • Unit - Create 1 Corrupted Bear for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
              • Unit Group - Add (Last created unit) to CreepCampGroup2
              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 2 <gen>)
              • Unit - Create 1 Corrupted Bear for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
              • Unit Group - Add (Last created unit) to CreepCampGroup2
              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 1 <gen>)
              • Unit - Create 1 Corrupted Bear for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
              • Unit Group - Add (Last created unit) to CreepCampGroup2
              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomCampInt Equal to 3
                • Then - Actions
                  • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Boss <gen>)
                  • Unit - Create 1 Warg Rider Captain for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to CreepCampGroup2
                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                  • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 3 <gen>)
                  • Unit - Create 1 Warg for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to CreepCampGroup2
                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                  • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 2 <gen>)
                  • Unit - Create 1 Warg for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to CreepCampGroup2
                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                  • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 1 <gen>)
                  • Unit - Create 1 Warg for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                  • Unit Group - Add (Last created unit) to CreepCampGroup2
                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • RandomCampInt Equal to 4
                    • Then - Actions
                      • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Boss <gen>)
                      • Unit - Create 1 Orc Commander for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                      • Unit Group - Add (Last created unit) to CreepCampGroup2
                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                      • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 3 <gen>)
                      • Unit - Create 1 Wild Orc for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                      • Unit Group - Add (Last created unit) to CreepCampGroup2
                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                      • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 2 <gen>)
                      • Unit - Create 1 Wild Orc for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                      • Unit Group - Add (Last created unit) to CreepCampGroup2
                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                      • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 1 <gen>)
                      • Unit - Create 1 Wild Orc for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                      • Unit Group - Add (Last created unit) to CreepCampGroup2
                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RandomCampInt Equal to 5
                        • Then - Actions
                          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Boss <gen>)
                          • Unit - Create 1 Lost Soul for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                          • Unit Group - Add (Last created unit) to CreepCampGroup2
                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 3 <gen>)
                          • Unit - Create 1 Warrior of the Dead for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                          • Unit Group - Add (Last created unit) to CreepCampGroup2
                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 2 <gen>)
                          • Unit - Create 1 Warrior of the Dead for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                          • Unit Group - Add (Last created unit) to CreepCampGroup2
                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 1 <gen>)
                          • Unit - Create 1 Warrior of the Dead for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                          • Unit Group - Add (Last created unit) to CreepCampGroup2
                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • RandomCampInt Equal to 6
                            • Then - Actions
                              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Boss <gen>)
                              • Unit - Create 1 Wild Hobbit Archer for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                              • Unit Group - Add (Last created unit) to CreepCampGroup2
                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 3 <gen>)
                              • Unit - Create 1 Wild Hobbit for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                              • Unit Group - Add (Last created unit) to CreepCampGroup2
                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 2 <gen>)
                              • Unit - Create 1 Wild Hobbit for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                              • Unit Group - Add (Last created unit) to CreepCampGroup2
                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 1 <gen>)
                              • Unit - Create 1 Wild Hobbit for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                              • Unit Group - Add (Last created unit) to CreepCampGroup2
                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • RandomCampInt Equal to 7
                                • Then - Actions
                                  • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Boss <gen>)
                                  • Unit - Create 1 Goblin Officier for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                  • Unit Group - Add (Last created unit) to CreepCampGroup2
                                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                  • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 3 <gen>)
                                  • Unit - Create 1 Goblin Spearman for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                  • Unit Group - Add (Last created unit) to CreepCampGroup2
                                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                  • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 2 <gen>)
                                  • Unit - Create 1 Goblin Spearman for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                  • Unit Group - Add (Last created unit) to CreepCampGroup2
                                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                  • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 1 <gen>)
                                  • Unit - Create 1 Goblin Spearman for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                  • Unit Group - Add (Last created unit) to CreepCampGroup2
                                  • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • RandomCampInt Equal to 8
                                    • Then - Actions
                                      • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Boss <gen>)
                                      • Unit - Create 1 Battle Troll for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                      • Unit Group - Add (Last created unit) to CreepCampGroup2
                                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                      • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 3 <gen>)
                                      • Unit - Create 1 Cave Troll for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                      • Unit Group - Add (Last created unit) to CreepCampGroup2
                                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                      • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 2 <gen>)
                                      • Unit - Create 1 Cave Troll for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                      • Unit Group - Add (Last created unit) to CreepCampGroup2
                                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                      • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 1 <gen>)
                                      • Unit - Create 1 Cave Troll for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                      • Unit Group - Add (Last created unit) to CreepCampGroup2
                                      • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • RandomCampInt Equal to 9
                                        • Then - Actions
                                          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Boss <gen>)
                                          • Unit - Create 1 Necromancer for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                          • Unit Group - Add (Last created unit) to CreepCampGroup2
                                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 3 <gen>)
                                          • Unit - Create 1 Reanimated Soul for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                          • Unit Group - Add (Last created unit) to CreepCampGroup2
                                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 2 <gen>)
                                          • Unit - Create 1 Reanimated Soul for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                          • Unit Group - Add (Last created unit) to CreepCampGroup2
                                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                          • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 1 <gen>)
                                          • Unit - Create 1 Reanimated Soul for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                          • Unit Group - Add (Last created unit) to CreepCampGroup2
                                          • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • RandomCampInt Equal to 10
                                            • Then - Actions
                                              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Boss <gen>)
                                              • Unit - Create 1 Thief Mage for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 1 <gen>)
                                              • Unit - Create 1 Thief for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 2 <gen>)
                                              • Unit - Create 1 Thief for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                              • Set VariableSet TempPointCreepCamp = (Center of Camp 2 Normal Creep 3 <gen>)
                                              • Unit - Create 1 Thief for Neutral Hostile at TempPointCreepCamp facing Default building facing degrees
                                              • Unit Group - Add (Last created unit) to CreepCampGroup1
                                              • Custom script: call RemoveLocation(udg_TempPointCreepCamp)
                                            • Else - Actions
 

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,865
When you dominate the creep remove it from the CreepCampGroup that it belongs to. Then add to it an ability which adds 1400 hit points like the ability on the Periapt of Vitality.


That aside, you should learn how to take advantage of Arrays to make your life a lot easier. You can avoid repetition like this.

A unit dies:
IF dying unit belongs to CreepCampGroup1 then do a bunch of stuff...
Else IF dying unit belongs to CreepCampGroup2 then do a bunch of stuff...
Else IF dying unit belongs to CreepCampGroup3 then do a bunch fo stuff...

When everything is in an Array then you can ask these questions a single time.

A unit dies:
Set variable CampIndex = Get dying unit's camp index (do this with a Unit Indexer / Hashtable)
Remove dying unit from CreepCampGroup[CampIndex]
If (All units of CreepCampGroup[CampIndex] are dead) Equal to True and CreepCampRespawning[CampIndex] Equal to False then...
Set Variable CreepCampRespawning[CampIndex] = True
Start TimerCreepCamp[CampIndex] as a One-shot timer...

So whenever you create a Creep you store their "CampIndex" number to them. You can do this using a Unit Indexer or a Hashtable. So if you create a unit for CreepCampGroup1 then their CampIndex would be set to 1. If you create them for CreepCampGroup2 then their CampIndex would be set to 2. Then you can use this number as the [index] in your variable Arrays to get the appropriate Unit Group, Boolean, Timer, etc.
 
Last edited:
Level 14
Joined
Jul 19, 2007
Messages
774
When you dominate the creep remove it from the CreepCampGroup that it belongs to. Then add to it an ability which adds 1400 hit points like the ability on the Periapt of Vitality.


That aside, you should learn how to take advantage of Arrays to make your life a lot easier. You can avoid repetition like this.

A unit dies:
IF dying unit belongs to CreepCampGroup1 then do a bunch of stuff...
Else IF dying unit belongs to CreepCampGroup2 then do a bunch of stuff...
Else IF dying unit belongs to CreepCampGroup3 then do a bunch fo stuff...

When everything is in an Array then you can ask these questions a single time.

A unit dies:
Set variable CampIndex = Get dying unit's camp index (do this with a Unit Indexer / Hashtable)
Remove dying unit from CreepCampGroup[CampIndex]
If (All units of CreepCampGroup[CampIndex] are dead) Equal to True and CreepCampRespawning[CampIndex] Equal to False then...
Set Variable CreepCampRespawning[CampIndex] = True
Start TimerCreepCamp[CampIndex] as a One-shot timer...

So whenever you create a Creep you store their "CampIndex" number to them. You can do this using a Unit Indexer or a Hashtable. So if you create a unit for CreepCampGroup1 then their CampIndex would be set to 1. If you create them for CreepCampGroup2 then their CampIndex would be set to 2. Then you can use this number as the [index] in your variable Arrays to get the appropriate Unit Group, Boolean, Timer, etc.
Sounds very complicated to me. I don't even dare to try because I'm afraid to fuck up something, sry. I need someone to make this for me then and you missunderstood the thing about 1400 hitpoint. I don't want it to add 1400 hitpoint, I want it to increase the dominated creep's current hitpoints to 1400.
 

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,865
You cast the dominate ability -> If Target unit of ability being cast belongs to CreepGroup1 then Remove target from CreepGroup1 ELSE If Target belongs to CreepGroup2 then Remove Target from CreepGroup2 -> Set Maximum HP of Target to 1400 -> Set Life of Target to 100%.

You already have triggers that check if a unit belongs to a group and adds/removes them from these groups. Just copy and paste those and adjust them to your needs.

@ThompZon
You can tell he's on 1.31+ because of all of the stupid syntax errors that blizz made like Set VariableSet:
  • Set VariableSet RespawnCreepTimer = 45.00
 

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,865
Dinodin I'm confident that you can do this.

1) Create a new trigger.

2) Create a new Action in said trigger and in the Search For Text field type "Set Max", then look for the Set Maximum HP action. Click that and fill out it's fields, setting 1400 for the hp value and Target unit of ability being cast for the unit value.
  • Unit - Set Max HP of (Target unit of ability being cast) to 1400

3) Then create another Action, again use Search For Text and type "Remove" and look for the action Remove from Unit Group. Click that and fill out it's fields, choosing CreepCampGroup1 as the Unit Group and Target unit of ability being cast as the unit value. Do this for both Unit Groups.
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup1.
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup2.

So now we need to add our Events/Conditions to make sure that these Actions run only when we cast Dominate on a unit.

  • Events:
  • Unit - A unit Starts the effect of an ability
  • Conditions:
  • Ability being cast Equal to Dominate
  • Actions:
  • Unit - Set Max HP of (Target unit of ability being cast) to 1400
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup1.
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup2.

Now there may be some extra steps you want to take to make sure that everything works properly. For starters, you may want to heal the Creep back to full hp, so you would do that after setting it's Max HP.
  • Unit - Set Max HP of (Target unit of ability being cast) to 1400
  • Unit - Set life of (Target unit of ability being cast) to 100%

Additionally, you probably want to check if the CreepCampGroup is empty now, since you may have Dominated the very last Creep inside of it and need to start the Respawn Timer.
  • Unit - Set Max HP of (Target unit of ability being cast) to 1400
  • Unit - Set life of (Target unit of ability being cast) to 100%
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup1.
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup2.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (CreepCampGroup1 is empty) Equal to True
      • CreepCampRespawning1 Equal to False
    • Then - Actions
      • Countdown Timer - Start TimerCreepCamp1 as a One-shot timer that will expire in RespawnCreepTimer seconds
      • Set VariableSet CreepCampRespawning1 = True
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (CreepCampGroup2 is empty) Equal to True
      • CreepCampRespawning2 Equal to False
    • Then - Actions
      • Countdown Timer - Start TimerCreepCamp2 as a One-shot timer that will expire in RespawnCreepTimer seconds
      • Set VariableSet CreepCampRespawning2 = True
    • Else - Actions
 
Last edited:
Level 14
Joined
Jul 19, 2007
Messages
774
Dinodin I'm confident that you can do this.

1) Create a new trigger.

2) Create a new Action in said trigger and in the Search For Text field type "Set Max", then look for the Set Maximum HP action. Click that and fill out it's fields, setting 1400 for the hp value and Target unit of ability being cast for the unit value.
  • Unit - Set Max HP of (Target unit of ability being cast) to 1400

3) Then create another Action, again use Search For Text and type "Remove" and look for the action Remove from Unit Group. Click that and fill out it's fields, choosing CreepCampGroup1 as the Unit Group and Target unit of ability being cast as the unit value. Do this for both Unit Groups.
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup1.
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup2.

So now we need to add our Events/Conditions to make sure that these Actions run only when we cast Dominate on a unit.

  • Events:
  • Unit - A unit Starts the effect of an ability
  • Conditions:
  • Ability being cast Equal to Dominate
  • Actions:
  • Unit - Set Max HP of (Target unit of ability being cast) to 1400
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup1.
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup2.

Now there may be some extra steps you want to take to make sure that everything works properly. For starters, you may want to heal the Creep back to full hp, so you would do that after setting it's Max HP.
  • Unit - Set Max HP of (Target unit of ability being cast) to 1400
  • Unit - Set life of (Target unit of ability being cast) to 100%

Additionally, you probably want to check if the CreepCampGroup is empty now, since you may have Dominated the very last Creep inside of it and need to start the Respawn Timer.
  • Unit - Set Max HP of (Target unit of ability being cast) to 1400
  • Unit - Set life of (Target unit of ability being cast) to 100%
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup1.
  • Unit Group - Remove (Target unit of ability being cast) from CreepCampGroup2.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (CreepCampGroup1 is empty) Equal to True
      • CreepCampRespawning1 Equal to False
    • Then - Actions
      • Countdown Timer - Start TimerCreepCamp1 as a One-shot timer that will expire in RespawnCreepTimer seconds
      • Set VariableSet CreepCampRespawning1 = True
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (CreepCampGroup2 is empty) Equal to True
      • CreepCampRespawning2 Equal to False
    • Then - Actions
      • Countdown Timer - Start TimerCreepCamp2 as a One-shot timer that will expire in RespawnCreepTimer seconds
      • Set VariableSet CreepCampRespawning2 = True
    • Else - Actions
Thank you so much! This solved my problems and it seems to be working exactly like I want it! :D
 

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,865
Link the dominated creep to the caster using a Unit Indexer or a Hashtable.


Unit Indexer method (GUI Unit Indexer 1.4.0.0):
  • Set Variable DominatedCreep[custom value of Triggering unit] = Target unit of ability being cast

Then Kill the Dominated Creep when you cast the Dominate ability:
  • Unit - Kill DominatedCreep[custom value of Triggering unit]
  • Set Variable DominatedCreep[custom value of Triggering unit] = Target unit of ability being cast
 
Last edited:
Level 14
Joined
Jul 19, 2007
Messages
774
Link the dominated creep to the caster using a Unit Indexer or a Hashtable.


Unit Indexer method (GUI Unit Indexer 1.4.0.0):
  • Set Variable DominatedCreep[custom value of Casting unit] = Target unit of ability being cast

Then Kill the Dominated Creep when you cast the Dominate ability:
  • Unit - Kill DominatedCreep[custom value of Casting unit]
  • Set Variable DominatedCreep[custom value of Casting unit] = Target unit of ability being cast
That's something I don't dare do by myself so you have to make it for me, pls.
 

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,865
You just need to copy and paste the Unit Indexer into your map and then put those 2 Actions (Kill/Set Variable) at the start of the Dominate trigger.

DominatedCreep is a Unit variable with an Array (you can check this on or off when you create a variable).


Note that a Unit Indexer takes advantage of Custom Value so if you've ever used that function before in your other triggers then there will be conflicts. There's a good chance that you haven't though so you're probably safe and don't have to worry about this. Also, make sure that you don't already have a Unit Indexer in your map, you only need 1 of these systems.

How it works:
Long story short a Unit Indexer assigns a unique number to each unit in the form of something called a Custom Value. It's basically an extra stat that Blizzard provided for us that we can use in triggers. It's similar to any other stat like Strength, Agility, Mana, etc. The system does this automatically for you whenever a unit is created so you don't have to worry about it.

So if your map has 100 units in it then they will all be given a Custom Value with a number between 1 and 100. No two units will EVER share the same Custom Value which is important to note. So the system basically numbers your units for you.

The reason this is useful is because it allows us to take advantage of Array Variables. You do this by using a unit's Custom Value as the [Index] in the Array. This essentially dedicates that [Index] of the variable to that specified unit, allowing you to save data directly to the unit. This opens up the door for many things such as what we're doing here with DominatedCreep.

As you can see in my example, I'm taking the Custom Value of the Hero that casts Dominate and using that as the [Index] in the DominatedCreep[] variable. This allows us to keep track of the Dominated Unit by basically linking it to our Hero. As long as we have access to our Hero, we can get access to it's Dominated Creep.

So let's say your Hero was assigned a Custom Value of 12 from the Unit Indexer. That means that the above 2 Actions are really more like this:
  • Unit - Kill DominatedCreep[12]
  • Set Variable DominatedCreep[12] = Target unit of ability being cast

If you're confused about what an Array does:
Arrays allow you to use a single Variable for multiple things. The trick is that you need to use a different [Index] for each value, for example:
  • Set Variable Hero[1] = Some unit
  • Set Variable Hero[2] = Some other unit
  • Set Variable Hero[3] = Some other other unit
Hero is a Unit variable, but it has an Array enabled which let's us assign multiple values to it as long as we give each one a different [Index]
(the number in the brackets).
 
Last edited:
Level 14
Joined
Jul 19, 2007
Messages
774
You just need to copy and paste the Unit Indexer into your map and then put those 2 Actions (Kill/Set Variable) at the start of the Dominate trigger.

DominatedCreep is a Unit variable with an Array (you can check this on or off when you create a variable).


Note that a Unit Indexer takes advantage of Custom Value so if you've ever used that function before in your other triggers then there will be conflicts. There's a good chance that you haven't though so you're probably safe and don't have to worry about this. Also, make sure that you don't already have a Unit Indexer in your map, you only need 1 of these systems.

How it works:
Long story short a Unit Indexer assigns a unique number to each unit in the form of something called a Custom Value. It's basically an extra stat that Blizzard provided for us that we can use in triggers. It's similar to any other stat like Strength, Agility, Mana, etc. The system does this automatically for you whenever a unit is created so you don't have to worry about it.

So if your map has 100 units in it then they will all be given a Custom Value with a number between 1 and 100. No two units will EVER share the same Custom Value which is important to note. So the system basically numbers your units for you.

The reason this is useful is because it allows us to take advantage of Array Variables. You do this by using a unit's Custom Value as the [Index] in the Array. This essentially dedicates that [Index] of the variable to that specified unit, allowing you to save data directly to the unit. This opens up the door for many things such as what we're doing here with DominatedCreep.

As you can see in my example, I'm taking the Custom Value of the Hero that casts Dominate and using that as the [Index] in the DominatedCreep[] variable. This allows us to keep track of the Dominated Unit by basically linking it to our Hero. As long as we have access to our Hero, we can get access to it's Dominated Creep.

So let's say your Hero was assigned a Custom Value of 12 from the Unit Indexer. That means that the above 2 Actions are really more like this:
  • Unit - Kill DominatedCreep[12]
  • Set Variable DominatedCreep[12] = Target unit of ability being cast

If you're confused about what an Array does:
Arrays allow you to use a single Variable for multiple things. The trick is that you need to use a different [Index] for each value, for example:
  • Set Variable Hero[1] = Some unit
  • Set Variable Hero[2] = Some other unit
  • Set Variable Hero[3] = Some other other unit
Hero is a Unit variable, but it has an Array enabled which let's us assign multiple values to it as long as we give each one a different [Index]
(the number in the brackets).
Man I'm trying but I don't really get it. It's the same as "damage detection system" I just don't get how it works like :'( I won't try anymore because I might crash my whole map! Btw I already got the Unit Indexer system in my map.
 
Level 14
Joined
Jul 19, 2007
Messages
774
So if you already have the Unit Indexer then you just need those 2 Actions I posted. Just add them to the very start of the Dominate trigger (On cast dominate -> do stuff).
I got it working now! But I have a question. Will this work for every player in my map? My map is a DOTA-like map with 5 players vs 5 players and if everyone is using this item, will it still work as it should then?
 

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,865
Yes it will work for every player. In fact, it's MUI which means that it will work for every single unit.

This is because no two units share the same custom value, so each unit has it's own [Index] of the DominatedCreep[] variable.

So using Dota as an example, let's say Player 1 picks Zeus and the Unit Indexer assigns the hero a custom value of 5. Then Player 2 picks Shadow Fiend and is assigned a custom value of 10.

If they both buy a Helm of the Dominator and use them then...

Zeus's dominated creep will be stored as [5] in DominatedCreep since he has a custom value of 5:
  • Set Variable DominatedCreep[5] = Zeus' creep

Shadow Fiend's dominated creep will be stored as [10] in DominatedCreep since he has a custom value of 10:
  • Set Variable DominatedCreep[10] = Shadow Fiend's creep

Since the Unit Indexer makes sure that each unit has it's own unique custom value you can rest assured that Zeus and Shadow Fiend will be the only ones with these custom values. No other unit will get DominatedCreep[5] or [10] because no other unit will have a custom value of 5 or 10.
 
Last edited:
Status
Not open for further replies.
Top