- Joined
- Mar 18, 2009
- Messages
- 793
Hello! I recently picked up warcraft 3 again and I got stuck on trying to optomize this trigger.
After I added the last line, "Custom script: call DestroyGroup(udg_CapGrp1)" the trigger's main function stops working. I tried repositioning it but from what I can tell it seems to be in the right place but Im not sure?
Also in short, this trigger is supposed to check and manage (partof) a point capture system revolving around Circle of Power buildings placed around the map. I'm trying to keep things simple, and feedback is very much appreciated!
After I added the last line, "Custom script: call DestroyGroup(udg_CapGrp1)" the trigger's main function stops working. I tried repositioning it but from what I can tell it seems to be in the right place but Im not sure?
Also in short, this trigger is supposed to check and manage (partof) a point capture system revolving around Circle of Power buildings placed around the map. I'm trying to keep things simple, and feedback is very much appreciated!
-
CaptureNe Test
-
Events
-
Time - Every 5.00 seconds of game time
-
-
Conditions
-
Actions
-
Game - Display to (All players) the text: test
-
Set VariableSet CapGrp1 = CapGrpNeutral
-
Unit Group - Pick every unit in CapGrp1 and do (Actions)
-
Loop - Actions
-
Set VariableSet CapPick = (Picked unit)
-
Set VariableSet CapPos = (Position of CapPick)
-
Set VariableSet CapPlayer = Neutral Passive
-
Set VariableSet CapNumber[13] = 0
-
Set VariableSet CapNumber[1] = 0
-
Set VariableSet CapNumber[2] = 0
-
Set VariableSet CapNumber[3] = 0
-
Set VariableSet CapNumber[4] = 0
-
Set VariableSet CapNumber[5] = 0
-
Set VariableSet CapNumber[6] = 0
-
Set VariableSet CapGrp2 = (Units within 512.00 of CapPos.)
-
Unit Group - Pick every unit in CapGrp2 and do (Actions)
-
Loop - Actions
-
Set VariableSet CapPicked = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of CapPicked) Equal to Neutral Hostile
-
-
Then - Actions
-
Set VariableSet CapNumber[13] = 2
-
Game - Display to (All players) the text: NHostile in place
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of CapPicked) Equal to Player 1 (Red)
-
-
Then - Actions
-
Set VariableSet CapNumber[1] = 1
-
Set VariableSet CapPlayer = Player 1 (Red)
-
Game - Display to (All players) the text: Capturing
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of CapPicked) Equal to Player 2 (Blue)
-
-
Then - Actions
-
Set VariableSet CapNumber[2] = 1
-
Set VariableSet CapPlayer = Player 2 (Blue)
-
Game - Display to (All players) the text: Capturing
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of CapPicked) Equal to Player 3 (Teal)
-
-
Then - Actions
-
Set VariableSet CapNumber[3] = 1
-
Set VariableSet CapPlayer = Player 3 (Teal)
-
Game - Display to (All players) the text: Capturing
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of CapPicked) Equal to Player 4 (Purple)
-
-
Then - Actions
-
Set VariableSet CapNumber[4] = 1
-
Set VariableSet CapPlayer = Player 4 (Purple)
-
Game - Display to (All players) the text: Capturing
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of CapPicked) Equal to Player 5 (Yellow)
-
-
Then - Actions
-
Set VariableSet CapNumber[5] = 1
-
Set VariableSet CapPlayer = Player 5 (Yellow)
-
Game - Display to (All players) the text: Capturing
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of CapPicked) Equal to Player 6 (Orange)
-
-
Then - Actions
-
Set VariableSet CapNumber[6] = 1
-
Set VariableSet CapPlayer = Player 6 (Orange)
-
Game - Display to (All players) the text: Capturing
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(CapNumber[1] + (CapNumber[2] + (CapNumber[3] + (CapNumber[4] + (CapNumber[5] + (CapNumber[6] + CapNumber[13])))))) Equal to 1
-
-
Then - Actions
-
Game - Display to (All players) the text: Point captured!
-
Unit - Change ownership of CapPick to CapPlayer and Change color
-
Unit Group - Remove CapPick from CapGrpNeutral.
-
Unit Group - Add CapPick to CapGrpP1[(Player number of CapPlayer)]
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_CapPos)
-
Custom script: call DestroyGroup(udg_CapGrp2)
-
-
-
Custom script: call DestroyGroup(udg_CapGrp1)
-
-