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

Enabling and Disabling Invulnerability of Units

Status
Not open for further replies.
Level 8
Joined
Jul 18, 2010
Messages
332
This is a complicated set of triggers but their goal is simple. The players need to activate two torches(There are two in the arena and there are also two in the boss stage, this fact doesn't matter that much though).

When activated, all Sorcerors of Seth abd the boss will be able to be hit, they'll be vulnerable and they're not spell immuned.

Everything works fine except for the being vulnerable part. Nothing happens, they are still invulnerable. I think it's the conditions but I'm not sure.

The Sorcerors and the boss btw aren't in the game at the same time.


  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Number of units in dungeongroup_Copy_5) Less than or equal to 2
    • Then - Actions
      • Set Region1 = (Random point in Lower Region <gen>)
      • Unit - Create 1 Sorceror of Seth for Neutral Hostile at Region1 facing Default building facing degrees
      • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Undead\AntiMagicShell\AntiMagicShell.mdl
      • Hashtable - Save Handle Of(Last created special effect) as 3 of (Key (Last created unit)) in aoehashtable
      • Unit Group - Add (Last created unit) to mages
      • Unit - Add Item Armor Bonus (+100000000) to (Last created unit)
      • Unit - Add Evasion (Khufu, Ashtaroth) to (Last created unit)
      • Unit - Add Spell Immunity to (Last created unit)
      • Unit - Change color of (Last created unit) to Brown
      • Custom script: call RemoveLocation(udg_Region1)
      • Set Region1 = (Random point in Lower Region <gen>)
      • Unit - Create 1 Sorceror of Seth for Neutral Hostile at Region1 facing Default building facing degrees
      • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Undead\AntiMagicShell\AntiMagicShell.mdl
      • Hashtable - Save Handle Of(Last created special effect) as 3 of (Key (Last created unit)) in aoehashtable
      • Unit Group - Add (Last created unit) to mages
      • Unit - Add Item Armor Bonus (+100000000) to (Last created unit)
      • Unit - Add Evasion (Khufu, Ashtaroth) to (Last created unit)
      • Unit - Add Spell Immunity to (Last created unit)
      • Unit - Change color of (Last created unit) to Brown
      • Custom script: call RemoveLocation(udg_Region1)
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Number of units in dungeongroup_Copy_5) Less than or equal to 2
    • Then - Actions
      • Set Region1 = (Random point in Lower Region <gen>)
      • Unit - Create 1 Sorceror of Seth for Neutral Hostile at Region1 facing Default building facing degrees
      • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Undead\AntiMagicShell\AntiMagicShell.mdl
      • Hashtable - Save Handle Of(Last created special effect) as 3 of (Key (Last created unit)) in aoehashtable
      • Unit Group - Add (Last created unit) to mages
      • Unit - Add Item Armor Bonus (+100000000) to (Last created unit)
      • Unit - Add Evasion (Khufu, Ashtaroth) to (Last created unit)
      • Unit - Add Spell Immunity to (Last created unit)
      • Unit - Change color of (Last created unit) to Brown
      • Custom script: call RemoveLocation(udg_Region1)
      • Set Region1 = (Random point in Lower Region <gen>)
      • Unit - Create 1 Sorceror of Seth for Neutral Hostile at Region1 facing Default building facing degrees
      • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Undead\AntiMagicShell\AntiMagicShell.mdl
      • Hashtable - Save Handle Of(Last created special effect) as 3 of (Key (Last created unit)) in aoehashtable
      • Unit Group - Add (Last created unit) to mages
      • Unit - Add Item Armor Bonus (+100000000) to (Last created unit)
      • Unit - Add Evasion (Khufu, Ashtaroth) to (Last created unit)
      • Unit - Add Spell Immunity to (Last created unit)
      • Unit - Change color of (Last created unit) to Brown
      • Custom script: call RemoveLocation(udg_Region1)
    • Else - Actions
  • Unit - Create 1 Immortal Sphinx for Neutral Hostile at BossSpot facing 270.00 degrees
  • Unit - Change color of (Last created unit) to Brown
  • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Human\ManaShield\ManaShieldCaster.mdl
  • Hashtable - Save Handle Of(Last created special effect) as 3 of (Key (Last created unit)) in aoehashtable
  • Unit Group - Add (Last created unit) to mages
  • Unit - Add Item Armor Bonus (+100000000) to (Last created unit)
  • Unit - Add Evasion (Khufu, Ashtaroth) to (Last created unit)
  • Unit - Add Spell Immunity to (Last created unit)
  • Set boss = (Last created unit)
  • Set oretinajump = 0


  • seth pyramid torch activate
    • Events
      • Player - Player 1 (Red) Presses the Down Arrow key
      • Player - Player 2 (Blue) Presses the Down Arrow key
      • Player - Player 3 (Teal) Presses the Down Arrow key
      • Player - Player 4 (Purple) Presses the Down Arrow key
      • Player - Player 5 (Yellow) Presses the Down Arrow key
      • Player - Player 6 (Orange) Presses the Down Arrow key
    • Conditions
    • Actions
      • Set bunkergroup = (Units owned by (Triggering player) matching ((((Unit-type of (Matching unit)) Equal to Magnus Dan) or ((((Matching unit) is A Hero) Equal to True) or (((Unit-type of (Matching unit)) Equal to Rin (Dark Goddess)) or ((Unit-type of (Matching unit)) Equal to Ri
      • Unit Group - Pick every unit in bunkergroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Boss Stage Entrance Copy <gen> contains (Picked unit)) Equal to True
            • Then - Actions
              • Unit - Create 1 burning effect wft for Neutral Hostile at BossStageEntrance_Copy facing Default building facing degrees
              • Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 burning effect wft for Neutral Hostile at BossStageEntrance_Copy facing Default building facing degrees
              • Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 Seth Torch Activate for Neutral Hostile at BossStageEntrance_Copy facing Default building facing degrees
              • Unit Group - Add (Last created unit) to torches
              • Hashtable - Save Handle Of(Last created unit) as 2 of (Key (Last created unit)) in aoehashtable
              • Hashtable - Save 15 as 1 of (Key (Last created unit)) in aoehashtable
              • Set oretinajump = (oretinajump + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • oretinajump Greater than or equal to 2
                • Then - Actions
                  • Set oretinajump = 2
                  • Unit Group - Pick every unit in mages and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Picked unit) Equal to boss
                        • Then - Actions
                          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Destroy (Load 3 of (Key (Picked unit)) in aoehashtable)
                      • Unit - Remove Item Armor Bonus (+100000000) from (Picked unit)
                      • Unit - Remove Spell Immunity from (Picked unit)
                      • Unit - Remove Evasion (Khufu, Ashtaroth) from (Picked unit)
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Boss Stage Entrance Copy 2 <gen> contains (Picked unit)) Equal to True
            • Then - Actions
              • Unit - Create 1 burning effect wft for Neutral Hostile at BossStageEntrance_Copy_2 facing Default building facing degrees
              • Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 burning effect wft for Neutral Hostile at BossStageEntrance_Copy_2 facing Default building facing degrees
              • Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 Seth Torch Activate for Neutral Hostile at BossStageEntrance_Copy_2 facing Default building facing degrees
              • Unit Group - Add (Last created unit) to torches
              • Hashtable - Save Handle Of(Last created unit) as 2 of (Key (Last created unit)) in aoehashtable
              • Hashtable - Save 15 as 1 of (Key (Last created unit)) in aoehashtable
              • Set oretinajump = (oretinajump + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • oretinajump Greater than or equal to 2
                • Then - Actions
                  • Set oretinajump = 2
                  • Unit Group - Pick every unit in mages and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Picked unit) Equal to boss
                        • Then - Actions
                          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Destroy (Load 3 of (Key (Picked unit)) in aoehashtable)
                      • Unit - Remove Item Armor Bonus (+100000000) from (Picked unit)
                      • Unit - Remove Spell Immunity from (Picked unit)
                      • Unit - Remove Evasion (Khufu, Ashtaroth) from (Picked unit)
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BossSpot Copy 5 <gen> contains (Picked unit)) Equal to True
            • Then - Actions
              • Unit - Create 1 burning effect wft for Neutral Hostile at BossSpot_Copy_5 facing Default building facing degrees
              • Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 burning effect wft for Neutral Hostile at BossSpot_Copy_5 facing Default building facing degrees
              • Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 Seth Torch Activate for Neutral Hostile at BossSpot_Copy_5 facing Default building facing degrees
              • Unit Group - Add (Last created unit) to torches
              • Hashtable - Save Handle Of(Last created unit) as 2 of (Key (Last created unit)) in aoehashtable
              • Hashtable - Save 15 as 1 of (Key (Last created unit)) in aoehashtable
              • Set oretinajump = (oretinajump + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • oretinajump Greater than or equal to 2
                • Then - Actions
                  • Set oretinajump = 2
                  • Unit Group - Pick every unit in mages and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Picked unit) Equal to boss
                        • Then - Actions
                          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Destroy (Load 3 of (Key (Picked unit)) in aoehashtable)
                      • Unit - Remove Item Armor Bonus (+100000000) from (Picked unit)
                      • Unit - Remove Spell Immunity from (Picked unit)
                      • Unit - Remove Evasion (Khufu, Ashtaroth) from (Picked unit)
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BossSpot Copy 6 <gen> contains (Picked unit)) Equal to True
            • Then - Actions
              • Unit - Create 1 burning effect wft for Neutral Hostile at BossSpot_Copy_6 facing Default building facing degrees
              • Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 burning effect wft for Neutral Hostile at BossSpot_Copy_6 facing Default building facing degrees
              • Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Create 1 Seth Torch Activate for Neutral Hostile at BossSpot_Copy_6 facing Default building facing degrees
              • Unit Group - Add (Last created unit) to torches
              • Hashtable - Save Handle Of(Last created unit) as 2 of (Key (Last created unit)) in aoehashtable
              • Hashtable - Save 15 as 1 of (Key (Last created unit)) in aoehashtable
              • Set oretinajump = (oretinajump + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • oretinajump Greater than or equal to 2
                • Then - Actions
                  • Set oretinajump = 2
                  • Unit Group - Pick every unit in mages and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Picked unit) Equal to boss
                        • Then - Actions
                          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                      • Special Effect - Destroy (Load 3 of (Key (Picked unit)) in aoehashtable)
                      • Unit - Remove Item Armor Bonus (+100000000) from (Picked unit)
                      • Unit - Remove Spell Immunity from (Picked unit)
                      • Unit - Remove Evasion (Khufu, Ashtaroth) from (Picked unit)
                • Else - Actions
            • Else - Actions
  • seth pyramid torches
    • Events
      • Time - Every 1.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in torches and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Seth Torch Activate
            • Then - Actions
              • Set aoetime = (Load 1 of (Key (Picked unit)) from aoehashtable)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load 1 of (Key (Picked unit)) from aoehashtable) Greater than 0.00
                • Then - Actions
                  • Hashtable - Save (aoetime - 1.50) as 1 of (Key (Picked unit)) in aoehashtable
                • Else - Actions
                  • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in aoehashtable
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load 1 of (Key (Picked unit)) from aoehashtable) Equal to 0.00
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • oretinajump Greater than or equal to 2
                    • Then - Actions
                      • Unit Group - Pick every unit in mages and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Picked unit) Equal to boss
                            • Then - Actions
                              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Human\ManaShield\ManaShieldCaster.mdl
                            • Else - Actions
                              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Undead\AntiMagicShell\AntiMagicShell.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as 3 of (Key (Picked unit)) in aoehashtable
                          • Unit - Add Item Armor Bonus (+100000000) to (Picked unit)
                          • Unit - Add Evasion (Khufu, Ashtaroth) to (Picked unit)
                          • Unit - Add Spell Immunity to (Picked unit)
                    • Else - Actions
                  • Set oretinajump = (oretinajump - 1)
                  • Unit - Kill (Load 2 of (Key (Picked unit)) in aoehashtable)
                  • Unit Group - Remove (Picked unit) from torches
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in torches) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do nothing


  • Unit - Create 1 Seth Torch for Neutral Hostile at BossStageEntrance_Copy facing 270.00 degrees
  • Unit - Create 1 Fire Embrace Aura for Neutral Hostile at BossStageEntrance_Copy facing 270.00 degrees
  • Animation - Change (Last created unit)'s size to (120.00%, 120.00%, 120.00%) of its original size
  • Unit - Create 1 Seth Torch for Neutral Hostile at BossStageEntrance_Copy_2 facing 270.00 degrees
  • Unit - Create 1 Fire Embrace Aura for Neutral Hostile at BossStageEntrance_Copy_2 facing 270.00 degrees
  • Animation - Change (Last created unit)'s size to (120.00%, 120.00%, 120.00%) of its original size
  • Trigger - Turn on seth pyramid torch activate <gen>
  • Set oretinajump = 0
  • Unit - Create 1 Anubis Statue for Neutral Hostile at riflemanpoint_Copy_3 facing 180.00 degrees
  • Hashtable - Save 15 as 5 of (Key (Last created unit)) in aoehashtable
  • Unit Group - Add (Last created unit) to statues
  • Unit - Create 1 Anubis Statue for Neutral Hostile at riflemanpoint_Copy_2 facing 0.00 degrees
  • Hashtable - Save 15 as 5 of (Key (Last created unit)) in aoehashtable
  • Unit Group - Add (Last created unit) to statues
  • Unit - Create 1 Anubis Statue for Neutral Hostile at riflemanpoint_Copy_8 facing 0.00 degrees
  • Hashtable - Save 15 as 5 of (Key (Last created unit)) in aoehashtable
  • Unit Group - Add (Last created unit) to statues
  • Unit - Create 1 Anubis Statue for Neutral Hostile at riflemanpoint_Copy_9 facing 180.00 degrees
  • Hashtable - Save 15 as 5 of (Key (Last created unit)) in aoehashtable
  • Unit Group - Add (Last created unit) to statues
  • Set Region1 = (Random point in Lower Region <gen>)
  • Unit - Create 1 Pyramid Trap for Neutral Hostile at Region1 facing Default building facing degrees
  • Unit Group - Add (Last created unit) to torches
  • Custom script: call RemoveLocation(udg_Region1)
  • Set Region1 = (Random point in Lower Region <gen>)
  • Unit - Create 1 Pyramid Trap for Neutral Hostile at Region1 facing Default building facing degrees
  • Unit Group - Add (Last created unit) to torches
  • Custom script: call RemoveLocation(udg_Region1)
  • Set Region1 = (Random point in Lower Region <gen>)
  • Unit - Create 1 Pyramid Trap for Neutral Hostile at Region1 facing Default building facing degrees
  • Unit Group - Add (Last created unit) to torches
  • Custom script: call RemoveLocation(udg_Region1)
  • Set Region1 = (Random point in Lower Region <gen>)
  • Unit - Create 1 Pyramid Trap for Neutral Hostile at Region1 facing Default building facing degrees
  • Unit Group - Add (Last created unit) to torches
  • Custom script: call RemoveLocation(udg_Region1)
  • Set Region1 = (Random point in Upper Region <gen>)
  • Unit - Create 1 Pyramid Trap for Neutral Hostile at Region1 facing Default building facing degrees
  • Unit Group - Add (Last created unit) to torches
  • Custom script: call RemoveLocation(udg_Region1)
  • Set Region1 = (Random point in Upper Region <gen>)
  • Unit - Create 1 Pyramid Trap for Neutral Hostile at Region1 facing Default building facing degrees
  • Unit Group - Add (Last created unit) to torches
  • Custom script: call RemoveLocation(udg_Region1)
  • Set Region1 = (Random point in Upper Region <gen>)
  • Unit - Create 1 Pyramid Trap for Neutral Hostile at Region1 facing Default building facing degrees
  • Unit Group - Add (Last created unit) to torches
  • Custom script: call RemoveLocation(udg_Region1)
  • Set Region1 = (Random point in Upper Region <gen>)
  • Unit - Create 1 Pyramid Trap for Neutral Hostile at Region1 facing Default building facing degrees
  • Unit Group - Add (Last created unit) to torches
  • Custom script: call RemoveLocation(udg_Region1)
  • Game - Pause the game
  • Environment - Set fog to style Linear, z-start 0.00, z-end 5000.00, density 0.00 and color (10.00%, 10.00%, 10.00%)
  • Quest - Display to (All players) the Quest Update message: |cff77bbffEvent Dun...
  • Wait 3.00 seconds
  • Game - Unpause the game
  • Environment - Reset fog to default values
  • Quest - Display to (All players) the Quest Update message: |cff77bbffNew Dunge...
  • Trigger - Turn on seth pyramid torches <gen>
  • Trigger - Turn on seth pyramid statues <gen>
  • Else - Actions
 
Level 8
Joined
Jul 18, 2010
Messages
332
@Zweibelchen Thx, I'll try that later.

There are similar effects to that effect that's why I'm having a hard time finding that. But I do know that the spell immunity, evasion, and the armor bonus aren't removed so the effects are probably not showing too ingame. And their "load 3 of key picked unit in aoehashtable" effect are also not remove.
 
Level 8
Joined
Jul 18, 2010
Messages
332
I've checked it now.

It always says two when I activate both torches. None of the sorcerors nor the boss became vulnerable, nor the sfx in them are gone. And the effect on the torches are never gone too, the Seth torch activate.

It's like none of them became part of the mages unit group.

EDIT: I've semi-solved this already, I think. The only thing that is probably not gonna be working now is the part where they become vulnerable, that's what I'm not getting at all.
I have a feeling that they become invulnerable again as soon as they become vulnerable.
 
Last edited:
The whole structuring of your triggers is weird.

Basicly, in your first trigger, for *every* unit in bunker group, you cycle through *all* units in "mages" and remove the invulnerability stuff.
Considering the "mages" group is a static, this makes no sense. Once is enough.
(In other words: if you have 3 units inside the bunker group, you remove all the invulnerability stuff three times PER UNIT!)

Your second trigger is even worse: for *every* unit in "torches", you cycle through *all* units in "mages" and add the invulnerability stuff. And this periodically. I also can not find where you actually assign units to the "mages" group.

Doing a "for every unit" loop inside a "for every unit" loop is likely to cause unwanted bugs and is certainly not what you actually want to achieve.
The "Picked Unit" response gets overwritten inside the inner "for every unit" loop. This is why you can't access "Picked Unit" after finishing the inner loop anymore.

If the loop-inside-loop behaviour is really what you want (I doubt that), make sure to assign the Picked Unit to a variable before running the inner loop.
 
Level 8
Joined
Jul 18, 2010
Messages
332
I think I'm the only one who knows how to fix this but it's great to know how the problem works. I think this part is what is causing it so I decided to delete it.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Number of units in torches) Equal to 0
    • Then - Actions
      • Trigger - Turn off (This trigger)
    • Else - Actions
      • Do nothing
 
I think I'm the only one who knows how to fix this but it's great to know how the problem works. I think this part is what is causing it so I decided to delete it.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Number of units in torches) Equal to 0
    • Then - Actions
      • Trigger - Turn off (This trigger)
    • Else - Actions
      • Do nothing
You have only posted parts of your trigger, so we can't really tell, as we don't even know the event of your torch setup trigger.

If torches can only be removed once and never respawn, turning off the trigger when it reaches 0 is correct.
 
Level 8
Joined
Jul 18, 2010
Messages
332
The whole structuring of your triggers is weird.

Basicly, in your first trigger, for *every* unit in bunker group, you cycle through *all* units in "mages" and remove the invulnerability stuff.
Considering the "mages" group is a static, this makes no sense. Once is enough.
(In other words: if you have 3 units inside the bunker group, you remove all the invulnerability stuff three times PER UNIT!)

Your second trigger is even worse: for *every* unit in "torches", you cycle through *all* units in "mages" and add the invulnerability stuff. And this periodically. I also can not find where you actually assign units to the "mages" group.

Doing a "for every unit" loop inside a "for every unit" loop is likely to cause unwanted bugs and is certainly not what you actually want to achieve.
The "Picked Unit" response gets overwritten inside the inner "for every unit" loop. This is why you can't access "Picked Unit" after finishing the inner loop anymore.

If the loop-inside-loop behaviour is really what you want (I doubt that), make sure to assign the Picked Unit to a variable before running the inner loop.


Sorry about that, you've seen my map, it's awful so I'm trying to fix that as best as I can.

The mages are static, if I understand what you're saying. I didn't show the whole trigger. Sorcerors are added periodically to that mages group.

The one with the bunker group is a bit complicated. The bunkergroup is the unit group that checks whether there is someone in those 4 regions. I think I should I fix this trigger cause I've thought of a better way.

There should be someone near that region, the region where the torch is located to activate the torch. The torch will be activated when the player presses the down arrow while on that region.

I've done the unit group within a unit group a lot of times already. I don't need to assign the picked unit to a variable cause that's exactly how I wanted it to be.

These triggers are too complicated but I'm pretty close to the answer.
 
Level 8
Joined
Jul 18, 2010
Messages
332
  • Unit - Create 1 burning effect wft for Neutral Hostile at BossStageEntrance_Copy facing Default building facing degrees
  • Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
  • Unit - Create 1 burning effect wft for Neutral Hostile at BossStageEntrance_Copy facing Default building facing degrees
  • Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
  • Unit - Create 1 Seth Torch Activate for Neutral Hostile at BossStageEntrance_Copy facing Default building facing degrees
  • Hashtable - Save Handle Of(Last created unit) as 2 of (Key (Last created unit)) in aoehashtable
  • Hashtable - Save 15 as 1 of (Key (Last created unit)) in aoehashtable
  • Unit Group - Add (Last created unit) to torches
This part of the trigger works, this the one on the "The Triggers" hidden tags.
But then this part doesn't work at all.

  • Set oretinajump = (oretinajump + 1)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • oretinajump Greater than or equal to 2
    • Then - Actions
      • Set oretinajump = 2
      • Unit Group - Pick every unit in mages and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) Equal to boss
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • Quest - Display to (All players) the New Unit Acquired message: |cffffff00Hint:|r A...
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
              • Special Effect - Destroy (Last created special effect)
          • Special Effect - Destroy (Load 3 of (Key (Picked unit)) in aoehashtable)
          • Unit - Remove Item Armor Bonus (+100000000) from (Picked unit)
          • Unit - Remove Spell Immunity from (Picked unit)
          • Unit - Remove Evasion (Khufu, Ashtaroth) from (Picked unit)
    • Else - Actions

I've done the checking through message and it says zero. In the boss, I don't know why, but it say two.
 
I've done the unit group within a unit group a lot of times already. I don't need to assign the picked unit to a variable cause that's exactly how I wanted it to be.
Yes, but it's the wrong approach here, as it doesn't do what it is supposed to do.
What you want is a group loop AFTER the group loop, not a group loop IN the group loop.

Look at it this way:
The outer group loop checks the first unit.
For this first unit, ALL units are checked and rendered invulnerable/vulnerable.
Then the outer group loop checks the second unit.
For this second unit, again, ALL units are checked and rendered invulnerable/vulnerable.

You are basicly repeating the same stuff over and over again, which makes no sense (there is no reason to make the unit invulnerable more than once in the same trigger).
 
Level 8
Joined
Jul 18, 2010
Messages
332
This problem is solved now. The triggers above are stupid. Since the number of torches are static, I just used timers.

I found out that the problem was with the mages group all along. I don't know why, but I guess picking up units in a "static" unit group inside another unit group is the problem. I just declared the unit group inside the unit group.

It works really great now.
 
Status
Not open for further replies.
Top