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
Peon TD v1.48.w3x
Variables
Initialization
Melee Initialization
camera
randomize
Death
shot you tower
Sell
Lotto
pionts
lumber
levels
time
attackers
move
lvl 41
victory
modes
go
easy mode
hard mode
peon Challenge
ultra hard
board of
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
enemy
unitcode
Yes
level
integer
No
loc
location
No
score
integer
Yes
timer
timer
No
Default melee game initialization for all players
Melee Initialization
Events
Map initialization
Conditions
Actions
If ((Player 1 (Red) slot status) Equal to Is playing) then do (Create 1.|cff00ff00Peon|r for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees) else do (Do nothing)
If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Create 1.|cff00ff00Peon|r for Player 2 (Blue) at (Player 2 (Blue) start location) facing Default building facing degrees) else do (Do nothing)
If ((Player 3 (Teal) slot status) Equal to Is playing) then do (Create 1.|cff00ff00Peon|r for Player 3 (Teal) at (Player 3 (Teal) start location) facing Default building facing degrees) else do (Do nothing)
If ((Player 4 (Purple) slot status) Equal to Is playing) then do (Create 1.|cff00ff00Peon|r for Player 4 (Purple) at (Player 4 (Purple) start location) facing Default building facing degrees) else do (Do nothing)
If ((Player 5 (Yellow) slot status) Equal to Is playing) then do (Create 1.|cff00ff00Peon|r for Player 5 (Yellow) at (Player 5 (Yellow) start location) facing Default building facing degrees) else do (Do nothing)
If ((Player 6 (Orange) slot status) Equal to Is playing) then do (Create 1.|cff00ff00Peon|r for Player 6 (Orange) at (Player 6 (Orange) start location) facing Default building facing degrees) else do (Do nothing)
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Camera - Set Player 1 (Red) 's camera Distance to target to 2500.00 over 1.00 seconds
Player - Set (Picked player) . Current gold to 5
Player - Set (Picked player) . Current lumber to 2
Wait 0.50 seconds
Game - Display to (All players) the text: ((Name of Player 1 (Red)) + has 20 seconds to chose game mode.)
Leaderboard - Create a leaderboard for (All players) titled Peon Score
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make Arrow Tower 16 Unavailable for training/construction by (Picked player)
Player - Make Mega Tower Unavailable for training/construction by (Picked player)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) slot status) Equal to Is playing
Then - Actions
Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0
Else - Actions
Leaderboard - Remove Player 12 (Brown) from (Last created leaderboard) .
Game - Set the time of day to 12
Game - Turn the day/night cycle Off
Player - Turn Gives bounty On for Player 12 (Brown)
Visibility - Disable fog of war
Visibility - Disable black mask
Countdown Timer - Start timer as a Repeating timer that will expire in 60.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Level in
Countdown Timer - Show (Last created timer window)
Set Variable Set level = "0"
Set Variable Set enemy[1] = "h000"
Set Variable Set enemy[2] = "h001"
Set Variable Set enemy[3] = "h002"
Set Variable Set enemy[4] = "h002"
Set Variable Set enemy[5] = "h004"
Set Variable Set enemy[6] = "h005"
Set Variable Set enemy[7] = "h006"
Set Variable Set enemy[8] = "h007"
Set Variable Set enemy[9] = "h008"
Set Variable Set enemy[10] = "h009"
Set Variable Set enemy[11] = "h00A"
Set Variable Set enemy[12] = "h00F"
Set Variable Set enemy[13] = "h00B"
Set Variable Set enemy[14] = "h00C"
Set Variable Set enemy[15] = "h00D"
Set Variable Set enemy[16] = "h00E"
Set Variable Set enemy[17] = "h00J"
Set Variable Set enemy[18] = "h00G"
Set Variable Set enemy[19] = "h00H"
Set Variable Set enemy[20] = "h00I"
Set Variable Set enemy[21] = "h013"
Set Variable Set enemy[22] = "h010"
Set Variable Set enemy[23] = "h011"
Set Variable Set enemy[24] = "h012"
Set Variable Set enemy[25] = "h00K"
Set Variable Set enemy[26] = "h00L"
Set Variable Set enemy[27] = "h00M"
Set Variable Set enemy[28] = "h00N"
Set Variable Set enemy[29] = "h00O"
Set Variable Set enemy[30] = "h00P"
Set Variable Set enemy[31] = "h00Q"
Set Variable Set enemy[32] = "h00R"
Set Variable Set enemy[33] = "h00S"
Set Variable Set enemy[34] = "h00T"
Set Variable Set enemy[35] = "h00U"
Set Variable Set enemy[36] = "h00V"
Set Variable Set enemy[37] = "h00W"
Set Variable Set enemy[38] = "h00X"
Set Variable Set enemy[39] = "h00Y"
Set Variable Set enemy[40] = "h00Z"
Set Variable Set enemy[41] = "h014"
Quest - Create a Required quest titled Welcome with the description This TD is simple. Build towers anywhere on map and they will shoot randomly to all enemy units. It's impotrant to build Barricades to protect towers. The more players are playing the more enemy units will spawn. , using icon path ReplaceableTextures\CommandButtons\BTNPeon.blp
Quest - Create a Required quest titled Commands (for red) with the description |cff66ff66These comands work at any time.|r -go (start next round) -for fun (hide score board)|cff66ff66These comands work only in first 20 seconds.|r -easy (get extra gold and lumber) -hard (get extra gold and lumber + enemy becomes a bit stronger) -ultra hard (get extra gold, lumber and teach + enemy becomes much powerful) -peon challenge (special chalange without towers) , using icon path ReplaceableTextures\CommandButtons\BTNSnazzyScrollPurple.blp
Wait 20.00 seconds
Trigger - Turn off easy_mode <gen>
Trigger - Turn off hard_mode <gen>
camera
Events
Time - Every 2 seconds of game time
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Camera - Set Player 1 (Red) 's camera Distance to target to 2500.00 over 1.00 seconds
randomize
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacked unit)) Equal to Player 12 (Brown)
((Attacking unit) is A structure) Equal to True
Actions
Unit - Order (Attacking unit) to Attack . (Random unit from (Units owned by Player 12 (Brown).))
Death
Events
Unit - A unit Dies
Conditions
(Unit-type of (Dying unit)) Equal to |cff00ff00Peon|r
Actions
Unit Group - Pick every unit in (Units owned by (Owner of (Dying unit)).) and do (Remove (Picked unit) from the game)
Quest - Display to (All players) the Quest Failed message: ((Name of (Triggering player)) + has fallen)
shot you tower
Events
Unit - A unit Finishes an upgrade
Conditions
((Triggering unit) is A structure) Equal to True
Actions
Wait 1.00 seconds
Unit - Order (Triggering unit) to Stop .
Sell
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Sell (Neutral Hostile 1), (Neutral Hostile)
Actions
Player - Add (Point-value of (Casting unit)) to (Owner of (Casting unit)) . Current gold
Unit - Remove (Casting unit) from the game
Lotto
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Killing unit)) Equal to Lotto Tower 1
Then - Actions
Player - Add 3 to (Owner of (Killing unit)) . Current gold
Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + |cffFF8000wins the lotto - 3 gold|r)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Killing unit)) Equal to Lotto Tower 2
Then - Actions
Player - Add 3 to (Owner of (Killing unit)) . Current gold
Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + |cffFF8000wins the lotto - 5 gold|r)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Killing unit)) Equal to Lotto Tower 3
Then - Actions
Player - Add 3 to (Owner of (Killing unit)) . Current gold
Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + |cffFF8000wins the lotto - 7 gold|r)
Else - Actions
pionts
Events
Unit - A unit Dies
Conditions
(Owner of (Dying unit)) Equal to Player 12 (Brown)
Actions
Set Variable Set score[(Player number of (Owner of (Killing unit)))] = (score[(Player number of (Owner of (Killing unit)))] + 1)
Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to score[(Player number of (Owner of (Killing unit)))]
lumber
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Trade for peon
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) Current gold) Greater than or equal to 30
Then - Actions
Player - Add -30 to (Triggering player) . Current gold
Player - Add 1 to (Triggering player) . Current lumber
Else - Actions
Game - Display to (Player group((Triggering player))) the text: You need more gold.
time
Events
Time - timer expires
Conditions
Actions
Set Variable Set level = (level + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
Or - Any (Conditions) are true
Conditions
level Equal to 10
level Equal to 20
level Equal to 30
level Equal to 40
Then - Actions
Game - Display to (All players) the text: (peons get 1 lumber for reaching level + (String(level)))
Player Group - Pick every player in (All players) and do (Add 1 to (Picked player).Current lumber)
Else - Actions
If (level Equal to 40) then do (Hide (Last created timer window)) else do (Do nothing)
If (level Equal to 41) then do (Pause timer) else do (Do nothing)
If (level Equal to 41) then do (Turn on lvl_41 <gen>) else do (Do nothing)
If (level Equal to 41) then do (Skip remaining actions) else do (Do nothing)
Game - Display to (All players) the text: (Entering level + (String(level)))
Trigger - Run attackers <gen> (ignoring conditions)
Wait 1.50 seconds
Trigger - Run attackers <gen> (ignoring conditions)
Wait 1.50 seconds
Trigger - Run attackers <gen> (ignoring conditions)
Wait 1.50 seconds
Trigger - Run attackers <gen> (ignoring conditions)
If (level Greater than 10) then do (Do nothing) else do (Skip remaining actions)
Wait 1.50 seconds
Trigger - Run attackers <gen> (ignoring conditions)
If (level Greater than 20) then do (Do nothing) else do (Skip remaining actions)
Wait 1.50 seconds
Trigger - Run attackers <gen> (ignoring conditions)
If (level Greater than 30) then do (Do nothing) else do (Skip remaining actions)
Wait 1.50 seconds
Trigger - Run attackers <gen> (ignoring conditions)
attackers
Events
Conditions
Actions
Set Variable Set loc = (Center of 1 <gen>)
If ((Number of living |cff00ff00Peon|r units owned by Player 1 (Red)) Equal to 1) then do (Create 2.enemy[level] for Player 12 (Brown) at loc facing Default building facing degrees) else do (Do nothing)
Custom script: call RemoveLocation(udg_loc)
Set Variable Set loc = (Center of 2 <gen>)
If ((Number of living |cff00ff00Peon|r units owned by Player 2 (Blue)) Equal to 1) then do (Create 2.enemy[level] for Player 12 (Brown) at loc facing Default building facing degrees) else do (Do nothing)
Custom script: call RemoveLocation(udg_loc)
Set Variable Set loc = (Center of 3 <gen>)
If ((Number of living |cff00ff00Peon|r units owned by Player 3 (Teal)) Equal to 1) then do (Create 2.enemy[level] for Player 12 (Brown) at loc facing Default building facing degrees) else do (Do nothing)
Custom script: call RemoveLocation(udg_loc)
Set Variable Set loc = (Center of 4 <gen>)
If ((Number of living |cff00ff00Peon|r units owned by Player 4 (Purple)) Equal to 1) then do (Create 2.enemy[level] for Player 12 (Brown) at loc facing Default building facing degrees) else do (Do nothing)
Custom script: call RemoveLocation(udg_loc)
Set Variable Set loc = (Center of 5 <gen>)
If ((Number of living |cff00ff00Peon|r units owned by Player 5 (Yellow)) Equal to 1) then do (Create 2.enemy[level] for Player 12 (Brown) at loc facing Default building facing degrees) else do (Do nothing)
Custom script: call RemoveLocation(udg_loc)
Set Variable Set loc = (Center of 6 <gen>)
If ((Number of living |cff00ff00Peon|r units owned by Player 6 (Orange)) Equal to 1) then do (Create 2.enemy[level] for Player 12 (Brown) at loc facing Default building facing degrees) else do (Do nothing)
Custom script: call RemoveLocation(udg_loc)
move
Events
Unit - A unit enters Region_007 <gen>
Conditions
Actions
Set Variable Set loc = (Random point in Region_000 <gen>)
Unit - Order (Entering unit) to Attack-Move To . loc
Custom script: call RemoveLocation(udg_loc)
lvl 41
Events
Player - Player 12 (Brown) 's Food used becomes Equal to 0.00
Conditions
Actions
Game - Display to (All players) the text: You suvived to Final Round
Trigger - Run attackers <gen> (ignoring conditions)
Wait 2 seconds
Trigger - Turn on victory <gen>
Trigger - Turn off (This trigger)
victory
Events
Player - Player 12 (Brown) 's Food used becomes Equal to 0.00
Conditions
Actions
Wait 3.00 seconds
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Game - Victory (Picked player) ( Show dialogs, Show scores)
go
Events
Player - Player 1 (Red) types a chat message containing -go (Unexpected type: 'stringnoformat') as An exact match
Conditions
Actions
Countdown Timer - Start timer as a Repeating timer that will expire in 60.00 seconds
Trigger - Run time <gen> (ignoring conditions)
easy mode
Events
Player - Player 1 (Red) types a chat message containing -easy (Unexpected type: 'stringnoformat') as An exact match
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Set the current research level of R002 (Unexpected type: 'techcode') to 2 for (Picked player)
Player - Set the current research level of R003 (Unexpected type: 'techcode') to 4 for (Picked player)
Player - Set the current research level of R00B (Unexpected type: 'techcode') to 2 for (Picked player)
Player - Add 3 to (Picked player) . Current lumber
Player - Add 5 to (Picked player) . Current gold
Trigger - Turn off (This trigger)
Quest - Display to (All players) the Quest Update message: ((Name of (Triggering player)) + |cff00FF00 has activated easy mode|r)
Quest - Display to (All players) the Quest Update message: (Every Peon will get extra + |cffFF80005 gold|r and |cff0080403lumber|r and all peons got |cffFF0000stronger|r)
Trigger - Turn off hard_mode <gen>
Trigger - Turn off ultra_hard <gen>
Trigger - Turn off peon_Challenge <gen>
hard mode
Events
Player - Player 1 (Red) types a chat message containing -hard (Unexpected type: 'stringnoformat') as An exact match
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Add 3 to (Picked player) . Current gold
Trigger - Turn off (This trigger)
Unit - Create 1 . Hard Mode for Player 12 (Brown) at (Center of Region_008 <gen>) facing Default building facing degrees
Quest - Display to (All players) the Quest Update message: ((Name of (Triggering player)) + |cff00FF00 has activated Hard mode|r)
Quest - Display to (All players) the Quest Update message: (Every Peon will get extra + |cffFF80003 gold|r but all enemy has increased |cffFF0000speed, damage and hitpoints|r )
Player - Set Player 12 (Brown) handicap to 140.00 %
Trigger - Turn off easy_mode <gen>
Trigger - Turn off ultra_hard <gen>
Trigger - Turn off peon_Challenge <gen>
peon Challenge
Events
Player - Player 1 (Red) types a chat message containing -peon challenge (Unexpected type: 'stringnoformat') as An exact match
Conditions
Actions
Trigger - Turn off (This trigger)
Player - Set Player 12 (Brown) handicap to 140.00 %
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make Arrow Tower 1 Unavailable for training/construction by (Picked player)
Player - Make Lotto Tower 1 Unavailable for training/construction by (Picked player)
Player - Make Super Tower Unavailable for training/construction by (Picked player)
Player - Make Cannon Tower 1 Unavailable for training/construction by (Picked player)
Player - Make Reserch Center Unavailable for training/construction by (Picked player)
Quest - Display to (All players) the Quest Update message: ((Name of (Triggering player)) + |cff00FF00 has activated |r|cffff00ffPeon Survival mode|r)
Quest - Display to (All players) the Quest Update message: Peons can't build towers.
Trigger - Turn off easy_mode <gen>
Trigger - Turn off ultra_hard <gen>
Trigger - Turn off hard_mode <gen>
Wait 2 seconds
Unit Group - Pick every unit in (Units of type Arrow Tower 1) and do (Remove (Picked unit) from the game)
Unit Group - Pick every unit in (Units of type Arrow Tower 2) and do (Remove (Picked unit) from the game)
Unit Group - Pick every unit in (Units of type Arrow Tower 3) and do (Remove (Picked unit) from the game)
Unit Group - Pick every unit in (Units of type Arrow Tower 4) and do (Remove (Picked unit) from the game)
Unit Group - Pick every unit in (Units of type Arrow Tower 5) and do (Remove (Picked unit) from the game)
ultra hard
Events
Player - Player 1 (Red) types a chat message containing -ultra hard (Unexpected type: 'stringnoformat') as An exact match
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Add 5 to (Picked player) . Current gold
Player - Add 1 to (Picked player) . Current lumber
Player - Make Mega Tower Available for training/construction by (Picked player)
Player - Make Arrow Tower 16 Available for training/construction by (Picked player)
Player - Set the current research level of R002 (Unexpected type: 'techcode') to 3 for (Picked player)
Player - Set the current research level of R008 (Unexpected type: 'techcode') to 3 for (Picked player)
Player - Set the current research level of R002 (Unexpected type: 'techcode') to 3 for (Picked player)
Player - Set the current research level of R00B (Unexpected type: 'techcode') to 3 for (Picked player)
Trigger - Turn off (This trigger)
Unit - Create 1 . Ultra Hard Mode for Player 12 (Brown) at (Center of Region_008 <gen>) facing Default building facing degrees
Quest - Display to (All players) the Quest Update message: ((Name of (Triggering player)) + |cff00FF00 has activated Ultra Hard mode|r)
Quest - Display to (All players) the Quest Update message: Every Peon will get extra |cffFF8000 recurses, increased peon streight and new tech levels |r but enemy has increased |cffFF0000speed, damage and hitpoints|r
Player - Set Player 12 (Brown) handicap to 185.00 %
Trigger - Turn off easy_mode <gen>
Trigger - Turn off hard_mode <gen>
Trigger - Turn off peon_Challenge <gen>
board of
Events
Player - Player 1 (Red) types a chat message containing -for fun (Unexpected type: 'stringnoformat') as An exact match
Conditions
Actions
Quest - Display to (All players) the Quest Update message: ((Name of (Triggering player)) + |cff00FF00 decided that there is no need for counting kills|r)
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.