Hello everyone! I'm building a custom Warcraft 3 campaign and I've encountered a logic bug that defies everything I know about the World Editor.
The Context:This is a "race" map between Mal'Ganis (Undead) and Peasants (Humans). There are 3 Granaries in total:
THE ISSUE:I play the map, I move Mal'Ganis to Silo 2. His trigger runs perfectly (score goes 1/3, animations play). BUT, when the Peasants arrive a few seconds later, they STILL enter the Then block of the IF statement.
Any help would be greatly appreciated!
The Context:This is a "race" map between Mal'Ganis (Undead) and Peasants (Humans). There are 3 Granaries in total:
- Silo 1: Owned by Humans by default from the start (SCORE_FAIL starts at 1).
- Silo 2 & 3: These are the objectives. If Humans secure one more (Silo 2 OR 3), SCORE_FAIL becomes 2 and the player gets Mission Failed (Defeat).
THE ISSUE:I play the map, I move Mal'Ganis to Silo 2. His trigger runs perfectly (score goes 1/3, animations play). BUT, when the Peasants arrive a few seconds later, they STILL enter the Then block of the IF statement.
- They ignore the SILOS_2_CLAIMED == True set by Mal'Ganis.
- They ignore the Trigger - Turn off command sent by Mal'Ganis.
- The SCORE_FAIL jumps from 1 to 2, and I get Mission Failed immediately, even though Mal'Ganis "won" that siloz.
- Variables: They are non-array, simple Booleans. No overlapping names.
- Ghost Triggers: I've deleted all old/copy-pasted triggers. I used Ctrl+F to ensure no other trigger is modifying SCORE_FAIL.
- Timing: Mal'Ganis sets the variable to True way before the Peasants arrive.
- Events: I tried Unit Enters Region and Unit Comes Within Range. Same result.
Any help would be greatly appreciated!
-
MISSION VICTORY MALGANIS
-

Events
-

Conditions
-


SCORE_WIN Equal to 2
-
-

Actions
-


Trigger - Turn off (This trigger)
-


Trigger - Turn off MISSION VICTORY HUMANS <gen>
-


Quest - Mark QUEST_MAIN as Completed
-


Cinematic - Send transmission to (All players) from MALGANIS named Mal`Ganis: Play Malganis_1 <gen> and display The plague is compl.... Modify duration: Add 15.20 seconds and Don't wait
-


Wait 5.00 seconds
-


Game - Display to (All players) the text: |cffd45e19Main Ques...
-


Animation - Play Gate (Horizontal) 0070 <gen>'s Death Alternate 1 animation
-
-
-
MISSION VICTORY HUMANS
-

Events
-

Conditions
-


SCORE_FAIL Equal to 2
-
-

Actions
-


Trigger - Turn off (This trigger)
-


Trigger - Turn off MISSION VICTORY MALGANIS <gen>
-


Quest - Mark QUEST_MAIN as Incomplete
-


Cinematic - Send transmission to (All players) from MALGANIS named Mal`Ganis: Play No sound and display Impossibile! The hu.... Modify duration: Add 5.00 seconds and Don't wait
-


Wait 5.00 seconds
-


Game - Display to (All players) the text: |cffd45e19Main Ques...
-


Game - Defeat Player 7 (Green) with the message: The humans have sec...
-
-
-
CHECK SILO WINNER 1 MALGANIS
-

Events
-


Unit - A unit enters GRAIN REGION2 <gen>
-
-

Conditions
-


(Unit-type of (Entering unit)) Equal to Mal'Ganis
-


SILOS_3_CLAIMED Equal to False
-
-

Actions
-


Trigger - Turn off CHECK SILO WINNER 3 HUMANS <gen>
-


Set VariableSet SCORE_WIN = (SCORE_WIN + 1)
-


Set VariableSet SILOS_3_CLAIMED = True
-


Unit - Move MALGANIS instantly to (Center of GRAIN REGION2 <gen>), facing (Position of Grain Warehouse 0108 <gen>)
-


Unit - Change ownership of MALGANIS to Player 23 (Emerald) and Retain color
-


Animation - Play MALGANIS's spell slam 1 animation
-


Trigger - Turn on MALGANIS SPELL LOOP <gen>
-


Wait 6.00 seconds
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 2 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 3 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 4 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 5 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 6 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 7 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 8 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 9 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 10 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 12 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 11 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 13 Copy 13 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Unit - Change ownership of MALGANIS to Player 7 (Green) and Retain color
-


Trigger - Turn off MALGANIS SPELL LOOP <gen>
-


Animation - Change MALGANIS's animation speed to 100.00% of its original speed
-


Animation - Reset MALGANIS's animation
-


Game - Display to Player Group - Player 7 (Green) the text: |cffd45e19MAIN QUES...
-


Sound - Play AchievementEarned <gen>
-


Quest - Change the description of QUEST_MAIN to (Infect the 3 Granary Silos ( + ((String(SCORE_WIN)) + /3)))
-


Trigger - Run MISSION VICTORY MALGANIS <gen> (checking conditions)
-
-
-
CHECK SILO WINNER 2 MALGANIS
-

Events
-


Unit - A unit enters GRAIN REGION1 <gen>
-
-

Conditions
-


(Unit-type of (Entering unit)) Equal to Mal'Ganis
-


SILOS_2_CLAIMED Equal to False
-
-

Actions
-


Trigger - Turn off CHECK SILO WINNER 2 HUMANS <gen>
-


Set VariableSet SCORE_WIN = (SCORE_WIN + 1)
-


Set VariableSet SILOS_2_CLAIMED = True
-


Unit - Move MALGANIS instantly to (Center of GRAIN REGION1 <gen>), facing (Position of Grain Warehouse 0107 <gen>)
-


Unit - Change ownership of MALGANIS to Player 23 (Emerald) and Retain color
-


Animation - Play MALGANIS's spell slam 1 animation
-


Trigger - Turn on MALGANIS SPELL LOOP <gen>
-


Wait 6.00 seconds
-


Special Effect - Create a special effect at (Center of INFECTED AREA <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 2 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 3 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 4 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 5 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 6 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 7 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 8 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 9 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 10 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 12 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Special Effect - Create a special effect at (Center of INFECTED AREA Copy 11 <gen>) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
-


Unit - Change ownership of MALGANIS to Player 7 (Green) and Retain color
-


Trigger - Turn off MALGANIS SPELL LOOP <gen>
-


Animation - Reset MALGANIS's animation
-


Animation - Change MALGANIS's animation speed to 100.00% of its original speed
-


Game - Display to Player Group - Player 7 (Green) the text: |cffd45e19MAIN QUES...
-


Sound - Play AchievementEarned <gen>
-


Quest - Change the description of QUEST_MAIN to (Infect the 3 Granary Silos ( + ((String(SCORE_WIN)) + /3)))
-


Trigger - Run MISSION VICTORY MALGANIS <gen> (checking conditions)
-
-
-
CHECK SILO WINNER 1 HUMANS
-

Events
-


Unit - A unit enters PEASANT MOVE 1 <gen>
-
-

Conditions
-


(Unit-type of (Entering unit)) Equal to Peasant
-


SILOS_1_CLAIMED Equal to False
-
-

Actions
-


Set VariableSet SCORE_FAIL = (SCORE_FAIL + 1)
-


Set VariableSet SILOS_1_CLAIMED = True
-


Wait 6.00 seconds
-


Game - Display to Player Group - Player 7 (Green) the text: |cffd45e19MAIN QUES...
-


Sound - Play AchievementEarned <gen>
-


Trigger - Run MISSION VICTORY HUMANS <gen> (checking conditions)
-
-
-
CHECK SILO WINNER 2 HUMANS
-

Events
-


Unit - A unit enters PEASANT 1 MOVE 2 <gen>
-
-

Conditions
-

Actions
-


Trigger - Turn off CHECK SILO WINNER 2 MALGANIS <gen>
-


Trigger - Turn off (This trigger)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Unit-type of (Entering unit)) Equal to Peasant
-




SILOS_2_CLAIMED Equal to False
-
-



Then - Actions
-




Set VariableSet SCORE_FAIL = (SCORE_FAIL + 1)
-




Set VariableSet SILOS_2_CLAIMED = True
-




Wait 6.00 seconds
-




Sound - Play AchievementEarned <gen>
-




Game - Display to Player Group - Player 7 (Green) the text: |cffd45e19MAIN QUES...
-




Trigger - Run MISSION VICTORY HUMANS <gen> (checking conditions)
-
-



Else - Actions
-




Game - Display to Player Group - Player 7 (Green) the text: |cffd45e19MAIN QUES...
-
-
-
-
-
CHECK SILO WINNER 3 HUMANS
-

Events
-


Unit - A unit enters PEASANT 2 MOVE 3 <gen>
-
-

Conditions
-


(Unit-type of (Entering unit)) Equal to Peasant
-


SILOS_3_CLAIMED Equal to False
-
-

Actions
-


Trigger - Turn off CHECK SILO WINNER 1 MALGANIS <gen>
-


Set VariableSet SCORE_FAIL = (SCORE_FAIL + 1)
-


Set VariableSet SILOS_3_CLAIMED = True
-


Wait 6.00 seconds
-


Game - Display to Player Group - Player 7 (Green) the text: |cffd45e19MAIN QUES...
-


Sound - Play AchievementEarned <gen>
-


Trigger - Run MISSION VICTORY HUMANS <gen> (checking conditions)
-
-
