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
Warcraft 3 Mobile Race.w3x
Variables
Initialization
Melee Initialization
Manual Pick
Start
Begin
Wait and Start
Win
AI
Move1
Move1 Copy
Move1 Copy 2
Units Go Outside the Way
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
Hero_Array
unitcode
Yes
Races_Start
timer
No
Random_Count
integer
No
Random_Data
integer
Yes
Random_Hero
integer
No
Total_Heroes
integer
No
Default melee game initialization for all players
Melee Initialization
Events
Map initialization
Conditions
Actions
Unit - Set Rally-Point for (Random unit from (Units owned by Player 1 (Red).)) to (Center of RP1 <gen>)
Unit - Set Rally-Point for (Random unit from (Units owned by Player 2 (Blue).)) to (Center of RP2 <gen>)
Unit - Set Rally-Point for (Random unit from (Units owned by Player 3 (Teal).)) to (Center of RP3 <gen>)
Unit - Set Rally-Point for (Random unit from (Units owned by Player 4 (Purple).)) to (Center of RP4 <gen>)
Countdown Timer - Create a timer window for Races_Start with title Start
Countdown Timer - Start Races_Start as a One-shot timer that will expire in 50.00 seconds
Countdown Timer - Show (Last created timer window)
Melee Game - Use melee time of day (for all players)
Visibility - Disable fog of war
Visibility - Disable black mask
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Set (Picked player) . Current gold to 800
Player - Set (Picked player) . Current lumber to 100
Player - Set (Picked player) . Food cap to 6
Set Variable Set Total_Heroes = "4"
Set Variable Set Random_Count = "4"
Set Variable Set Hero_Array[1] = "H000"
Set Variable Set Hero_Array[2] = "O000"
Set Variable Set Hero_Array[3] = "O001"
Set Variable Set Hero_Array[4] = "U000"
For each (Integer A) from 1 to 4 , do (Actions)
Loop - Actions
Set Variable Set Random_Data[(Integer A)] = (Integer A)
Manual Pick
Events
Unit - A unit Sells a unit
Conditions
((Sold unit) is A Hero) Equal to True
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
Game - Display to (All players) the text: ((Name of (Triggering player)) + ( Has Choosen + (Name of (Sold unit))))
Selection - Select (Sold unit) for (Owner of (Sold unit))
Unit - Remove (Buying unit) from the game
Start
Events
Time - Races_Start expires
Conditions
Actions
Countdown Timer - Destroy (Last created timer window)
Game - Display to (All players) the text: |cffffcc00The Game will start just in the moment. Move your hero to the Runes near Shoga the Administrator.|r
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) controller) Equal to Computer
Then - Actions
Unit - Order (Last created unit) to Move To . (Center of Begin <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) controller) Equal to Computer
Then - Actions
Unit - Order (Last created unit) to Move To . (Center of Begin <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) controller) Equal to Computer
Then - Actions
Unit - Order (Last created unit) to Move To . (Center of Begin <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 4 (Purple) controller) Equal to Computer
Then - Actions
Unit - Order (Last created unit) to Move To . (Center of Begin <gen>)
Else - Actions
Trigger - Turn on Begin <gen>
Begin
Events
Unit - A unit enters Begin <gen>
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Unit - Move (Triggering unit) instantly to (Random point in Region_006 <gen>) , facing 270.00 degrees
Unit - Pause all units
Trigger - Run Wait_and_Start <gen> (ignoring conditions)
Wait and Start
Events
Conditions
Actions
Trigger - Turn on Units_Go_Outside_the_Way <gen>
Wait 1.00 seconds
Game - Display to (All players) the text: |cffffcc003|r
Wait 1.00 seconds
Game - Display to (All players) the text: |cffff7c002|r
Wait 1.00 seconds
Game - Display to (All players) the text: |cffff00001|r
Wait 1.00 seconds
Game - Display to (All players) the text: |cffff0000Start!!!|r
Unit - Unpause all units
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) controller) Equal to Computer
Then - Actions
Unit - Order (Last created unit) to Move To . (Center of Ai1 <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) controller) Equal to Computer
Then - Actions
Unit - Order (Last created unit) to Move To . (Center of Ai1 <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) controller) Equal to Computer
Then - Actions
Unit - Order (Last created unit) to Move To . (Center of Ai1 <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 4 (Purple) controller) Equal to Computer
Then - Actions
Unit - Order (Last created unit) to Move To . (Center of Ai1 <gen>)
Else - Actions
Win
Events
Unit - A unit enters Finish <gen>
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Sound - Play Heroic Victory .
Wait 20.00 seconds
Game - Display to (All players) the text: |cffffcc00Game will ended for 20 seconds.|r
Game - Victory (Owner of (Triggering unit)) ( Show dialogs, Show scores)
AI
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 1 (Red) controller) Equal to Computer
Then - Actions
Unit - Create 1 . Hero_Array[Random_Data[Random_Hero]] for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 2 (Blue) controller) Equal to Computer
Then - Actions
Unit - Create 1 . Hero_Array[Random_Data[Random_Hero]] for Player 2 (Blue) at (Player 2 (Blue) start location) facing Default building facing degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 3 (Teal) controller) Equal to Computer
Then - Actions
Unit - Create 1 . Hero_Array[Random_Data[Random_Hero]] for Player 3 (Teal) at (Player 3 (Teal) start location) facing Default building facing degrees
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player 4 (Purple) controller) Equal to Computer
Then - Actions
Unit - Create 1 . Hero_Array[Random_Data[Random_Hero]] for Player 4 (Purple) at (Player 4 (Purple) start location) facing Default building facing degrees
Else - Actions
Game - Display to (All players) the text: ((Name of (Triggering player)) + ( Has Choosen + (Name of (Sold unit))))
Unit - Remove (Buying unit) from the game
Move1
Events
Unit - A unit enters Ai1 <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) controller) Equal to Computer
Then - Actions
Unit - Order (Triggering unit) to Move To . (Center of Ai2 <gen>)
Else - Actions
Move1 Copy
Events
Unit - A unit enters Ai2 <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) controller) Equal to Computer
Then - Actions
Unit - Order (Triggering unit) to Move To . (Center of Ai3 <gen>)
Else - Actions
Move1 Copy 2
Events
Unit - A unit enters Ai3 <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) controller) Equal to Computer
Then - Actions
Unit - Order (Triggering unit) to Move To . (Center of Finish <gen>)
Else - Actions
Units Go Outside the Way
Events
Unit - A unit enters Region_010 <gen>
Unit - A unit enters Region_011 <gen>
Unit - A unit enters Region_012 <gen>
Unit - A unit enters Region_013 <gen>
Unit - A unit enters Region_015 <gen>
Unit - A unit enters Region_014 <gen>
Unit - A unit enters Region_016 <gen>
Unit - A unit enters Region_017 <gen>
Unit - A unit enters Region_018 <gen>
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Then - Actions
Unit - Move (Triggering unit) instantly to (Center of RP1 <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
Then - Actions
Unit - Move (Triggering unit) instantly to (Center of RP2 <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
Then - Actions
Unit - Move (Triggering unit) instantly to (Center of RP3 <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Then - Actions
Unit - Move (Triggering unit) instantly to (Center of RP4 <gen>)
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.