- Joined
- Aug 11, 2009
- Messages
- 605
What the triggers are supposed to do is add some random passives to a group of units that spawn at the beginning of the map. However, only the first group recieves their random abilities, the next group gets none. I will post all the triggers below. Would be very grateful if anyone could find the problem.
--- SPAWNING TRIGGERS ---
--- SPAWNING TRIGGERS ---
-
Spawn Elites 1 DF
-
Events
- Time - Elapsed game time is 5.00 seconds
- Conditions
-
Actions
- -------- The Dark Forest --------
- Set Integer_Randomizer = (Random integer number between 1 and 2)
- Set Unit_EliteSpawn = Unit_EliteType[Integer_Randomizer]
- Set Integer_Randomizer = (Random integer number between 1 and 6)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Integer_Randomizer Equal to Integer_NoSpawn
-
Then - Actions
- Trigger - Run Spawn Elites 1 DF <gen> (checking conditions)
-
Else - Actions
- Set Integer_NoSpawn = Integer_Randomizer
-
For each (Integer A) from 1 to 3, do (Actions)
-
Loop - Actions
- Unit - Create 1 Unit_EliteSpawn for Player 1 (Red) at Point_DFEliteSpawn[Integer_Randomizer] facing Default building facing degrees
- Unit Group - Add (Last created unit) to UnitGroup_Elite[1]
-
Loop - Actions
- Set Integer_EliteGroup = 1
- Trigger - Run Set Affix 1 <gen> (checking conditions)
-
If - Conditions
-
Events
-
Spawn Elites 2 DF
-
Events
- Time - Elapsed game time is 10.00 seconds
- Conditions
-
Actions
- -------- The Dark Forest --------
- Set Integer_Randomizer = (Random integer number between 1 and 2)
- Set Unit_EliteSpawn = Unit_EliteType[Integer_Randomizer]
- Set Integer_Randomizer = (Random integer number between 1 and 6)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Integer_Randomizer Equal to Integer_NoSpawn
-
Then - Actions
- Trigger - Run Spawn Elites 2 DF <gen> (checking conditions)
-
Else - Actions
- Set Integer_NoSpawn = 0
-
For each (Integer A) from 1 to 3, do (Actions)
-
Loop - Actions
- Unit - Create 1 Unit_EliteSpawn for Player 1 (Red) at Point_DFEliteSpawn[Integer_Randomizer] facing Default building facing degrees
- Unit Group - Add (Last created unit) to UnitGroup_Elite[2]
-
Loop - Actions
- Set Integer_EliteGroup = 2
- Trigger - Run Set Affix 1 <gen> (checking conditions)
-
If - Conditions
-
Events
-
Set Affix 1
- Events
- Conditions
-
Actions
- Set Integer_Randomizer = (Random integer number between 1 and 8)
- Set Ability_EliteAffix2[1] = Ability_EliteAffix[Integer_Randomizer]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Ability_EliteAffix2[1] Equal to War Stomp (Neutral Hostile 1)
-
Then - Actions
- Trigger - Run (This trigger) (checking conditions)
-
Else - Actions
- Set Ability_EliteAffix[Integer_Randomizer] = War Stomp (Neutral Hostile 1)
-
Unit Group - Pick every unit in UnitGroup_Elite[Integer_EliteGroup] and do (Actions)
-
Loop - Actions
- Unit - Add Ability_EliteAffix2[Integer_Randomizer] to (Picked unit)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- Difficulty_Nightmare Equal to True
- Difficulty_Hell Equal to True
- Difficulty_Inferno Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Trigger - Run Set Affix 2 <gen> (checking conditions)
-
Else - Actions
- Trigger - Run Reset Affixes <gen> (checking conditions)
-
If - Conditions
-
If - Conditions
-
Set Affix 2
- Events
- Conditions
-
Actions
- Set Integer_Randomizer = (Random integer number between 1 and 8)
- Set Ability_EliteAffix2[2] = Ability_EliteAffix[Integer_Randomizer]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Ability_EliteAffix2[2] Equal to War Stomp (Neutral Hostile 1)
-
Then - Actions
- Trigger - Run (This trigger) (checking conditions)
-
Else - Actions
- Set Ability_EliteAffix[Integer_Randomizer] = War Stomp (Neutral Hostile 1)
-
Unit Group - Pick every unit in UnitGroup_Elite[Integer_EliteGroup] and do (Actions)
-
Loop - Actions
- Unit - Add Ability_EliteAffix2[2] to (Picked unit)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- Difficulty_Hell Equal to True
- Difficulty_Inferno Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Trigger - Run Set Affix 3 <gen> (checking conditions)
-
Else - Actions
- Trigger - Run Reset Affixes <gen> (checking conditions)
-
If - Conditions
-
If - Conditions
-
Set Affix 3
- Events
- Conditions
-
Actions
- Set Integer_Randomizer = (Random integer number between 1 and 8)
- Set Ability_EliteAffix2[3] = Ability_EliteAffix[Integer_Randomizer]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Ability_EliteAffix2[3] Equal to War Stomp (Neutral Hostile 1)
-
Then - Actions
- Trigger - Run (This trigger) (checking conditions)
-
Else - Actions
- Set Ability_EliteAffix[Integer_Randomizer] = War Stomp (Neutral Hostile 1)
-
Unit Group - Pick every unit in UnitGroup_Elite[Integer_EliteGroup] and do (Actions)
-
Loop - Actions
- Unit - Add Ability_EliteAffix2[3] to (Picked unit)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- Difficulty_Inferno Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Trigger - Run Set Affix 4 <gen> (checking conditions)
-
Else - Actions
- Trigger - Run Reset Affixes <gen> (checking conditions)
-
If - Conditions
-
If - Conditions
-
Set Affix 4
- Events
- Conditions
-
Actions
- Set Integer_Randomizer = (Random integer number between 1 and 8)
- Set Ability_EliteAffix2[4] = Ability_EliteAffix[Integer_Randomizer]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Ability_EliteAffix2[4] Equal to War Stomp (Neutral Hostile 1)
-
Then - Actions
- Trigger - Run (This trigger) (checking conditions)
-
Else - Actions
-
Unit Group - Pick every unit in UnitGroup_Elite[Integer_EliteGroup] and do (Actions)
-
Loop - Actions
- Unit - Add Ability_EliteAffix2[4] to (Picked unit)
-
Loop - Actions
- Trigger - Run Reset Affixes <gen> (checking conditions)
-
Unit Group - Pick every unit in UnitGroup_Elite[Integer_EliteGroup] and do (Actions)
-
If - Conditions
-
Reset Affixes
- Events
- Conditions
-
Actions
- Set Ability_EliteAffix[1] = Deflect [Elite Affix]
- Set Ability_EliteAffix[2] = Fast [Elite Affix]
- Set Ability_EliteAffix[3] = Fiery Soul [Elite Affix]
- Set Ability_EliteAffix[4] = Might [Elite Affix]
- Set Ability_EliteAffix[5] = Reflect [Elite Affix]
- Set Ability_EliteAffix[6] = Stoneskin [Elite Affix]
- Set Ability_EliteAffix[7] = Vampiric [Elite Affix]
- Set Ability_EliteAffix[8] = Frozen Soul [Elite Affix]