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
Mortar Wars BETA.2.w3x
Variables
Hero Stuff
Range Circle
Speed Circle
Power Circle
Select Random
SetRandom
Initialization
revive
SetSpots
Revive
Scoreboard
Create
Refresh
Kills
Timer
CreateTimer
Expire
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
CTimer
timer
No
Kills
integer
Yes
Leader
player
No
PlayerChosen
boolean
Yes
Random
unitcode
Yes
Revive
rect
Yes
SB
multiboard
No
TempInt
integer
No
Range Circle
Events
Unit - A unit enters Region_003 <gen>
Conditions
Actions
Unit - Create 1 . Range Mortar for (Owner of (Triggering unit)) at (Random point in Region_005 <gen>) facing Default building facing degrees
Unit - Kill (Triggering unit)
Set Variable Set PlayerChosen[(Player number of (Owner of (Triggering unit)))] = "true"
Speed Circle
Events
Unit - A unit enters Region_004 <gen>
Conditions
Actions
Unit - Create 1 . Speed Mortar for (Owner of (Triggering unit)) at (Random point in Region_005 <gen>) facing Default building facing degrees
Unit - Kill (Triggering unit)
Set Variable Set PlayerChosen[(Player number of (Owner of (Triggering unit)))] = "true"
Power Circle
Events
Unit - A unit enters Region_002 <gen>
Conditions
Actions
Unit - Create 1 . Power Mortar for (Owner of (Triggering unit)) at (Random point in Region_005 <gen>) facing Default building facing degrees
Unit - Kill (Triggering unit)
Set Variable Set PlayerChosen[(Player number of (Owner of (Triggering unit)))] = "true"
Select Random
Events
Player - Player 1 (Red) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 2 (Blue) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 3 (Teal) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 4 (Purple) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 5 (Yellow) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 6 (Orange) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 7 (Green) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 8 (Pink) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 9 (Gray) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 10 (Light Blue) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 11 (Dark Green) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Player - Player 12 (Brown) types a chat message containing -random (Unexpected type: 'stringnoformat') as An exact match
Conditions
PlayerChosen[(Player number of (Triggering player))] Equal to False
Actions
Set Variable Set TempInt = (Random integer number between 1 and 5)
Unit Group - Pick every unit in (Units owned by (Triggering player) of type Shade) and do (Actions)
Loop - Actions
Unit - Remove (Picked unit) from the game
Unit - Create 1 . Random[TempInt] for (Triggering player) at (Center of Revive[(Random integer number between 1 and 4)]) facing Default building facing degrees
Game - Display to (Player group((Triggering player))) the text: (You have randomed a + (Name of (Last created unit)))
Set Variable Set TempInt = (Random integer number between 1 and 5)
Set Variable Set PlayerChosen[(Player number of (Triggering player))] = "true"
SetRandom
Events
Map initialization
Conditions
Actions
Set Variable Set Random[1] = "H007"
Set Variable Set Random[2] = "H001"
Set Variable Set Random[3] = "H002"
Set Variable Set Random[4] = "H000"
Set Variable Set Random[5] = "H004"
SetSpots
Events
Map initialization
Conditions
Actions
Set Variable Set Revive[7] = Region_007 <gen>
Set Variable Set Revive[6] = Region_006 <gen>
Set Variable Set Revive[5] = Region_005 <gen>
Set Variable Set Revive[1] = Revive1 <gen>
Set Variable Set Revive[2] = Revive2 <gen>
Set Variable Set Revive[3] = Revive4 <gen>
Set Variable Set Revive[4] = Revive3 <gen>
Revive
Events
Unit - A unit Dies
Conditions
Actions
Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has killed + (Name of (Owner of (Dying unit)))))
Hero - Instantly revive (Dying unit) at (Random point in Revive[(Random integer number between 1 and 7)]) , Show revival graphics
Create
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Multiboard - Create a multiboard with 2 columns and 13 rows, titled Game Stats .
Set Variable Set SB = (Last created multiboard)
Multiboard - Set the text for SB item in column 1 , row 1 to |c00ff0000Player|r
Multiboard - Set the text for SB item in column 2 , row 1 to |c00ff0000Kills|r
Multiboard - Set the width for SB item in column 1 , row 0 to 10.00 % of the total screen width
Multiboard - Set the width for SB item in column 2 , row 0 to 3.00 % of the total screen width
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Multiboard - Set the text for SB item in column 1 , row ((Player number of (Picked player)) + 1) to (Name of (Picked player))
Multiboard - Set the text for SB item in column 2 , row ((Player number of (Picked player)) + 1) to (String(Kills[(Player number of (Picked player))]))
Trigger - Turn on Refresh <gen>
Refresh
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Multiboard - Set the text for SB item in column 1 , row ((Player number of (Picked player)) + 1) to (Name of (Picked player))
Multiboard - Set the text for SB item in column 2 , row ((Player number of (Picked player)) + 1) to (String(Kills[(Player number of (Picked player))]))
Kills
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Set Variable Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
CreateTimer
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Countdown Timer - Start CTimer as a One-shot timer that will expire in 1800.00 seconds
Countdown Timer - Create a timer window for CTimer with title Game Ends
Expire
Events
Time - CTimer expires
Conditions
Actions
For each (Integer A) from 1 to 12 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer A) Equal to 1
Then - Actions
Set Variable Set Leader = Player 1 (Red)
Else - Actions
If (Kills[(Integer A)] Greater than Kills[(Player number of Leader)]) then do (Set VariableSet Leader = (Player((Integer A)))) else do (Do nothing)
Game - Display to (All players) the text: ((Name of Leader) + has won the game! Ending in 10 seconds!)
Game - Victory Leader ( Show dialogs, Show scores)
Player Group - Pick every player in (All players matching ((Matching player) Not equal to Leader).) and do (Actions)
Loop - Actions
Game - Defeat (Picked player) with the message: Defeat!
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.