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!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
DesertControl_v1.1.w3x
Variables
Initialization
Initialization
P2 AI (Incomplete)
HQAdd
AIStrikeAdd
HQRemove
Attack
Training
Rally Point
ReturnToBase
Victory and Defeat
P1Victory
P2Victory
P3Victory
P4Victory
P1Loss
P2Loss
P3Loss
P4Loss
Other
Taxes
Oil Tankers Enter
Oil Tankers Exit
CHEAT 200 percent gold
TO DO
Neutral Buildings
To Do
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
Name
Type
is_array
initial_value
AICapture
group
No
AIHQ
group
No
AIStrike
group
No
BaseAttack
integer
No
Capture
integer
No
Storm
abilcode
No
A000
Temp_Group
group
No
Temp_Point
location
No
UnitTraining
integer
No
Initialization
Events
Map initialization
Conditions
Actions
Melee Game - Use melee time of day (for all players)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) slot status) Equal to Is playing
Then - Actions
Unit - Change ownership of Headquarters 0019 <gen> to Player 1 (Red) and Change color
Player - Set Player 1 (Red) . Current gold to 5
Camera - Pan camera for Player 1 (Red) to (Position of Headquarters 0019 <gen>) over 0 seconds
Trigger - Turn on P1Loss <gen>
Trigger - Turn on P1Victory <gen>
Else - Actions
Trigger - Turn off P1Loss <gen>
Trigger - Turn off P1Victory <gen>
Unit - Remove Headquarters 0019 <gen> from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) slot status) Equal to Is playing
Then - Actions
Unit - Change ownership of Headquarters 0017 <gen> to Player 2 (Blue) and Change color
Player - Set Player 2 (Blue) . Current gold to 5
Camera - Pan camera for Player 2 (Blue) to (Position of Headquarters 0017 <gen>) over 0 seconds
Trigger - Turn on P2Loss <gen>
Trigger - Turn on P2Victory <gen>
Else - Actions
Trigger - Turn off P2Loss <gen>
Trigger - Turn off P2Victory <gen>
Unit - Remove Headquarters 0017 <gen> from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) slot status) Equal to Is playing
Then - Actions
Unit - Change ownership of Headquarters 0016 <gen> to Player 3 (Teal) and Change color
Player - Set Player 3 (Teal) . Current gold to 5
Camera - Pan camera for Player 3 (Teal) to (Position of Headquarters 0016 <gen>) over 0 seconds
Trigger - Turn on P3Loss <gen>
Trigger - Turn on P3Victory <gen>
Else - Actions
Trigger - Turn off P3Loss <gen>
Trigger - Turn off P3Victory <gen>
Unit - Remove Headquarters 0016 <gen> from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 4 (Purple) slot status) Equal to Is playing
Then - Actions
Unit - Change ownership of Headquarters 0018 <gen> to Player 4 (Purple) and Change color
Player - Set Player 4 (Purple) . Current gold to 5
Camera - Pan camera for Player 4 (Purple) to (Position of Headquarters 0018 <gen>) over 0 seconds
Trigger - Turn on P4Loss <gen>
Trigger - Turn on P4Victory <gen>
Else - Actions
Trigger - Turn off P4Loss <gen>
Trigger - Turn off P4Victory <gen>
Unit - Remove Headquarters 0018 <gen> from the game
Game - Display to (All players) for 20.00 seconds the text: Welcome to Barren Capture! To begin playing, train a unit from your Headquarters to capture some Building Sites. Once you have captured a Building Site, you can upgrade it into a structure that provides a bonus such as gold income, population maximum, or allowing you to research how to train new units and more.
Wait 20.00 seconds
Game - Display to (All players) the text: Every 10 seconds, you gain a tax bonus based on the structures you have.
Unable to test.
HQAdd
Events
Unit - A unit Finishes casting an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Ability being cast) Equal to Storm
(Unit-type of (Target unit of ability being cast)) Equal to Headquarters
(Owner of (Casting unit)) Equal to Player 2 (Blue)
Then - Actions
Unit Group - Add (Target unit of ability being cast) to AIHQ
Else - Actions
Do nothing
Unable to test.
AIStrikeAdd
Events
Unit - A unit Finishes training a unit
Conditions
Actions
If ((Owner of (Trained unit)) Equal to Player 2 (Blue)) then do (Add (Trained unit) to AIStrike) else do (Do nothing)
Unable to test.
HQRemove
Events
Unit - A unit Changes owner
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Ability being cast) Equal to Storm
(Unit-type of (Target unit of ability being cast)) Equal to Headquarters
(Owner of (Casting unit)) Not equal to Player 2 (Blue)
Then - Actions
Unit Group - Remove (Target unit of ability being cast) from AIHQ .
Else - Actions
Do nothing
Working.
Attack
Events
Time - Every (Random real number between 40.00 and 60.00) seconds of game time
Conditions
Actions
Unit Group - Pick every unit in AIStrike and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Attack-Move To . (Random point in P1Loc <gen>)
Working.
Training
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set Variable Set UnitTraining = (Random integer number between 1 and 9)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
UnitTraining Equal to 1
UnitTraining Equal to 2
UnitTraining Equal to 3
Then - Actions
Unit Group - Order AIHQ to train a Axeman
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
UnitTraining Equal to 4
UnitTraining Equal to 5
Then - Actions
Unit Group - Order AIHQ to train a Soldier
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
UnitTraining Equal to 6
UnitTraining Equal to 7
Then - Actions
Unit Group - Order AIHQ to train a Gunman
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
UnitTraining Equal to 8
Then - Actions
Unit Group - Order AIHQ to train a Horseman
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
UnitTraining Equal to 9
Then - Actions
Unit Group - Order AIHQ to train a Tank
Else - Actions
Working.
Rally Point
Events
Time - Every 3.00 seconds of game time
Conditions
Actions
Unit - Order Headquarters 0017 <gen> to Set Rally Point To . (Random point in P2Base <gen>)
Unable to test.
ReturnToBase
Events
Unit - A unit enters P1Loc <gen>
Unit - A unit enters P4Loc <gen>
Unit - A unit enters P3Loc <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Entering unit) is in (Units owned by Player 2 (Blue).).) Equal to True
Then - Actions
Unit - Order (Entering unit) to Attack-Move To . (Random point in P2Base <gen>)
Else - Actions
Do nothing
P1Victory
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Number of living Headquarters units owned by Player 2 (Blue)) Equal to 0
(Number of living Headquarters units owned by Player 3 (Teal)) Equal to 0
(Number of living Headquarters units owned by Player 4 (Purple)) Equal to 0
Then - Actions
Game - Display to (All players) the text: ((Name of Player 1 (Red)) + has won the game!)
Wait 3.00 seconds
Game - Victory Player 1 (Red) ( Show dialogs, Show scores)
Game - Defeat Player 2 (Blue) with the message: Defeat!
Game - Defeat Player 3 (Teal) with the message: Defeat!
Game - Defeat Player 4 (Purple) with the message: Defeat!
Trigger - Turn off (This trigger)
Else - Actions
P2Victory
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Number of living Headquarters units owned by Player 1 (Red)) Equal to 0
(Number of living Headquarters units owned by Player 3 (Teal)) Equal to 0
(Number of living Headquarters units owned by Player 4 (Purple)) Equal to 0
Then - Actions
Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + has won the game!)
Wait 3.00 seconds
Game - Victory Player 2 (Blue) ( Show dialogs, Show scores)
Game - Defeat Player 1 (Red) with the message: Defeat!
Game - Defeat Player 3 (Teal) with the message: Defeat!
Game - Defeat Player 4 (Purple) with the message: Defeat!
Trigger - Turn off (This trigger)
Else - Actions
P3Victory
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Number of living Headquarters units owned by Player 2 (Blue)) Equal to 0
(Number of living Headquarters units owned by Player 1 (Red)) Equal to 0
(Number of living Headquarters units owned by Player 4 (Purple)) Equal to 0
Then - Actions
Game - Display to (All players) the text: ((Name of Player 3 (Teal)) + has won the game!)
Wait 3.00 seconds
Game - Victory Player 3 (Teal) ( Show dialogs, Show scores)
Game - Defeat Player 1 (Red) with the message: Defeat!
Game - Defeat Player 2 (Blue) with the message: Defeat!
Game - Defeat Player 4 (Purple) with the message: Defeat!
Trigger - Turn off (This trigger)
Else - Actions
P4Victory
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Number of living Headquarters units owned by Player 2 (Blue)) Equal to 0
(Number of living Headquarters units owned by Player 3 (Teal)) Equal to 0
(Number of living Headquarters units owned by Player 1 (Red)) Equal to 0
Then - Actions
Game - Display to (All players) the text: ((Name of Player 3 (Teal)) + has won the game!)
Wait 3.00 seconds
Game - Victory Player 4 (Purple) ( Show dialogs, Show scores)
Game - Defeat Player 1 (Red) with the message: Defeat!
Game - Defeat Player 2 (Blue) with the message: Defeat!
Game - Defeat Player 3 (Teal) with the message: Defeat!
Trigger - Turn off (This trigger)
Else - Actions
P1Loss
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of living Headquarters units owned by Player 1 (Red)) Equal to 0
Then - Actions
Game - Display to (All players) the text: ((Name of Player 1 (Red)) + has been defeated!)
Set Variable Set Temp_Group = (Units owned by Player 1 (Red).)
Unit Group - Pick every unit in Temp_Group and do (Kill (Picked unit))
Custom script: call DestroyGroup (udg_Temp_Group)
Trigger - Turn off (This trigger)
Else - Actions
P2Loss
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of living Headquarters units owned by Player 2 (Blue)) Equal to 0
Then - Actions
Game - Display to (All players) the text: ((Name of Player 2 (Blue)) + has been defeated!)
Set Variable Set Temp_Group = (Units owned by Player 2 (Blue).)
Unit Group - Pick every unit in Temp_Group and do (Kill (Picked unit))
Custom script: call DestroyGroup (udg_Temp_Group)
Trigger - Turn off (This trigger)
Else - Actions
P3Loss
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of living Headquarters units owned by Player 3 (Teal)) Equal to 0
Then - Actions
Game - Display to (All players) the text: ((Name of Player 3 (Teal)) + has been defeated!)
Set Variable Set Temp_Group = (Units owned by Player 3 (Teal).)
Unit Group - Pick every unit in Temp_Group and do (Kill (Picked unit))
Custom script: call DestroyGroup (udg_Temp_Group)
Trigger - Turn off (This trigger)
Else - Actions
P4Loss
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of living Headquarters units owned by Player 4 (Purple)) Equal to 0
Then - Actions
Game - Display to (All players) the text: ((Name of Player 4 (Purple)) + has been defeated!)
Set Variable Set Temp_Group = (Units owned by Player 4 (Purple).)
Unit Group - Pick every unit in Temp_Group and do (Kill (Picked unit))
Custom script: call DestroyGroup (udg_Temp_Group)
Trigger - Turn off (This trigger)
Else - Actions
Taxes
Events
Time - Every 10.00 seconds of game time
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Add ((Number of living Headquarters units owned by (Picked player)) x 4) to (Picked player) . Current gold
Player - Add ((Number of living Tent units owned by (Picked player)) x 1) to (Picked player) . Current gold
Player - Add ((Number of living Hut units owned by (Picked player)) x 2) to (Picked player) . Current gold
Player - Add ((Number of living Gold Mine units owned by (Picked player)) x 5) to (Picked player) . Current gold
Player - Add ((Number of living Outpost units owned by (Picked player)) x 3) to (Picked player) . Current gold
Set Variable Set Temp_Group = (Units owned by (Picked player) matching ((Level of Oil Collection (Oil Tanker) for (Matching unit)) Greater than 0).)
Unit Group - Pick every unit in Temp_Group and do (Actions)
Loop - Actions
Player - Add ((Number of units in Temp_Group) x 5) to (Picked player) . Current gold
Custom script: call DestroyGroup(udg_Temp_Group)
Oil Tankers Enter
Events
Unit - A unit enters Oil1 <gen>
Unit - A unit enters Oil2 <gen>
Unit - A unit enters Oil3 <gen>
Unit - A unit enters Oil4 <gen>
Unit - A unit enters Oil5 <gen>
Unit - A unit enters Oil6 <gen>
Conditions
(Unit-type of (Entering unit)) Equal to Oil Tanker
Actions
Unit - Add Oil Collection (Oil Tanker) to (Entering unit)
Oil Tankers Exit
Events
Unit - A unit leaves Oil1 <gen>
Unit - A unit leaves Oil2 <gen>
Unit - A unit leaves Oil3 <gen>
Unit - A unit leaves Oil4 <gen>
Unit - A unit leaves Oil5 <gen>
Unit - A unit leaves Oil6 <gen>
Conditions
(Unit-type of (Leaving unit)) Equal to Oil Tanker
Actions
Unit - Remove Oil Collection (Oil Tanker) from (Leaving unit)
CHEAT 200 percent gold
Events
Player - Player 1 (Red) types a chat message containing -money (Unexpected type: 'stringnoformat') as An exact match
Player - Player 2 (Blue) types a chat message containing -money (Unexpected type: 'stringnoformat') as An exact match
Player - Player 3 (Teal) types a chat message containing -money (Unexpected type: 'stringnoformat') as An exact match
Player - Player 4 (Purple) types a chat message containing -money (Unexpected type: 'stringnoformat') as An exact match
Conditions
Actions
Player - Set (Triggering player) . Current gold to (((Triggering player) Current gold) x 2)
Game - Display to (All players) the text: ((Name of (Triggering player)) + has used a cheat code!)
Neutral Buildings
Events
Unit - A unit Dies
Conditions
((Dying unit) is A structure) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Dying unit)) Equal to Tent
(Unit-type of (Dying unit)) Equal to Hut
(Unit-type of (Dying unit)) Equal to Tower
(Unit-type of (Dying unit)) Equal to Stables
(Unit-type of (Dying unit)) Equal to Blacksmith
(Unit-type of (Dying unit)) Equal to Church
(Unit-type of (Dying unit)) Equal to Gold Mine
(Unit-type of (Dying unit)) Equal to Workshop
(Unit-type of (Dying unit)) Equal to Outpost
Then - Actions
Set Variable Set Temp_Point = (Position of (Dying unit))
Unit - Create 1 . Building Site for Neutral Passive at Temp_Point facing Default building facing degrees
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.