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
Mountain Defense V1.0.0.w3x
Variables
Initialization
Main Notes
StartResource
Night
Friendly Allies
AlliedRedHitBlue
AlliedRedHitTeal
AlliedRedHitPurple
AlliedBlueHitRed
AlliedBlueHitTeal
AlliedBlueHitPurple
AlliedTealHitRed
AlliedTealHitBlue
AlliedTealHitPurple
AlliedPurpleHitRed
AlliedPurpleHitBlue
AlliedPurpleHitTeal
Resources
Rocks
Indestructable Trees
GoldMillLvl1
HoboResource
HoboResourceExpire
Countdown
Timer
TimerEnd
Quests
About
WinConditions
HikersWin
HikersWinEnd
HikersHaveWon
HoboDiesRespawn
HoboWinBase
HikersDie
RedDie
BlueDie
TealDie
PurpleDie
HoboTrainingArea
HoboTrainOn
HoboTrainCommand
HoboTrainOff
HoboLevelUp
HoboLevel
QuitTriggers
RedQuit
BlueQuit
TealQuit
PurpleQuit
BrownQuit
HikerKillInstant
Red
Blue
Teal
Purple
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
HikerWinTimer
timer
No
Hobo
unit
No
HoboReleaseTimer
timer
No
HoboTimerResource
timer
No
NumberOfPlayers
integer
No
Hiking in mountains and mad hobo attacks.
StartResource
Events
Map initialization
Conditions
Actions
Player - Add 50 to Player 1 (Red) . Current gold
Player - Add 50 to Player 2 (Blue) . Current gold
Player - Add 50 to Player 3 (Teal) . Current gold
Player - Add 50 to Player 4 (Purple) . Current gold
Player - Add 60 to Player 1 (Red) . Current lumber
Player - Add 60 to Player 2 (Blue) . Current lumber
Player - Add 60 to Player 3 (Teal) . Current lumber
Player - Add 60 to Player 4 (Purple) . Current lumber
Night
Events
Map initialization
Conditions
Actions
Game - Set the time of day to 12
AlliedRedHitBlue
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 1 (Red)
(Owner of (Attacked unit)) Equal to Player 2 (Blue)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedRedHitTeal
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 1 (Red)
(Owner of (Attacked unit)) Equal to Player 3 (Teal)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedRedHitPurple
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 1 (Red)
(Owner of (Attacked unit)) Equal to Player 4 (Purple)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedBlueHitRed
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 2 (Blue)
(Owner of (Attacked unit)) Equal to Player 1 (Red)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedBlueHitTeal
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 2 (Blue)
(Owner of (Attacked unit)) Equal to Player 3 (Teal)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedBlueHitPurple
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 2 (Blue)
(Owner of (Attacked unit)) Equal to Player 4 (Purple)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedTealHitRed
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 3 (Teal)
(Owner of (Attacked unit)) Equal to Player 1 (Red)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedTealHitBlue
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 3 (Teal)
(Owner of (Attacked unit)) Equal to Player 2 (Blue)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedTealHitPurple
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 3 (Teal)
(Owner of (Attacked unit)) Equal to Player 4 (Purple)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedPurpleHitRed
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 4 (Purple)
(Owner of (Attacked unit)) Equal to Player 1 (Red)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedPurpleHitBlue
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 4 (Purple)
(Owner of (Attacked unit)) Equal to Player 2 (Blue)
Actions
Unit - Order (Attacking unit) to Stop .
AlliedPurpleHitTeal
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 4 (Purple)
(Owner of (Attacked unit)) Equal to Player 3 (Teal)
Actions
Unit - Order (Attacking unit) to Stop .
Rocks
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacked unit)) Equal to Rocks
(Unit-type of (Attacking unit)) Equal to Gold Harvester
Actions
Player - Add (Random integer number between 1 and 2) to (Owner of (Attacking unit)) . Current gold
Indestructable Trees
Events
Time - Every 60.00 seconds of game time
Conditions
Actions
Destructible - Pick every destructible in (Playable map area) and do (Actions)
Loop - Actions
Destructible - Set life of (Picked destructible) to 100 %
GoldMillLvl1
Events
Time - Every 5.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 Gold Mill units owned by (Picked player)) x 2) to (Picked player) . Current gold
HoboResource
Events
Time - Elapsed game time is 2.00 seconds
Conditions
Actions
Countdown Timer - Create a timer window for HoboTimerResource with title Hobo Resources:
Wait 1.00 seconds
Countdown Timer - Start HoboTimerResource as a Repeating timer that will expire in 90.00 seconds
HoboResourceExpire
Events
Time - HoboTimerResource expires
Conditions
Actions
Player - Add 10 to Player 12 (Brown) . Current gold
Player - Add 3 to Player 12 (Brown) . Current lumber
Game - Display to Player Group - Player 12 (Brown) the text: You have recieved 10 gold and 3 lumber.
Timer
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Countdown Timer - Create a timer window for HoboReleaseTimer with title Hobo Released In:
Wait 1.00 seconds
Countdown Timer - Start HoboReleaseTimer as a One-shot timer that will expire in 140.00 seconds
TimerEnd
Events
Time - HoboReleaseTimer expires
Conditions
Actions
Countdown Timer - Destroy (Last created timer window)
Unit - Create 1 . Hobo for Player 12 (Brown) at (Center of HoboSpawn <gen>) facing Default building facing degrees
Set Variable Set Hobo = (Last created unit)
Game - Display to (All players) the text: The hobo has been released to kill the hikers! Better have your defense ready! He's on a rampage!
Player - Add 10 to Player 12 (Brown) . Current gold
Player - Add 3 to Player 12 (Brown) . Current lumber
Game - Display to Player Group - Player 12 (Brown) the text: You have recieved 10 gold and 3 lumber.
About
Events
Map initialization
Conditions
Actions
Quest - Create a Required quest titled About with the description The hobo's (brown) mountain has been intruded by 4 hikers. The hobo is on a rampage to kill all the hikers. The hikers must build towers and walls to defend themselves while researching, teching, and gaining resources. When a hiker dies, all is lost for that hiker! Hikers must survive for the given time. , using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
Quest - Create a Optional quest titled Comments with the description This is version 1.0.0 of Mountain Defense. This version needs major balancing, such as are the items for the hobo compared to his periodic resource gain unfair, do the hikers buildings cost too much/too less, etc.You can go to http://hiveworkshop.com and search for this map and comment (if you have an account) on what can be done to improve this game. If you think something needs to be changed in this game, say it so I can consider it! Thank you! , using icon path ReplaceableTextures\CommandButtons\BTNHeal.blp
Quest - Create a Optional quest titled Credits with the description Map Created By: Chief_Of_GxBxLSpecial Thanks To: Defeated - for commenting so much in the BETA test!Map Available At: http://hiveworkshop.com (search for it under the maps section)Additional Thanks To: fdgsgds - for helping me make some triggers. , using icon path ReplaceableTextures\CommandButtons\BTNHeal.blp
HikersWin
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Countdown Timer - Create a timer window for HikerWinTimer with title Hikers Win In:
Wait 1.00 seconds
Countdown Timer - Start HikerWinTimer as a One-shot timer that will expire in 1200.00 seconds
HikersWinEnd
Events
Time - HikerWinTimer expires
Conditions
Actions
Trigger - Turn on HikersHaveWon <gen>
Wait 10.00 seconds
Game - Victory Player 1 (Red) ( Show dialogs, Show scores)
Game - Victory Player 2 (Blue) ( Show dialogs, Show scores)
Game - Victory Player 3 (Teal) ( Show dialogs, Show scores)
Game - Victory Player 4 (Purple) ( Show dialogs, Show scores)
Game - Victory Player 9 (Gray) ( Show dialogs, Skip scores)
Game - Defeat Player 12 (Brown) with the message: Defeat! You lost!
HikersHaveWon
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Game - Display to (All players) the text: Hikers Have Won! The Hobo Failed To Kill All Hikers In The Time Given!
HoboDiesRespawn
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Hobo
Actions
Game - Display to (All players) the text: The hobo has died! He will respawn in the middle in 4 seconds!
Wait 4.00 seconds
Unit - Create 1 . Hobo for Player 12 (Brown) at (Center of HoboSpawn <gen>) facing Default building facing degrees
HoboWinBase
Events
Player - Player 1 (Red) leaves the game
Player - Player 2 (Blue) leaves the game
Player - Player 3 (Teal) leaves the game
Player - Player 4 (Purple) leaves the game
Unit - Hiker 0028 <gen> Dies
Unit - Hiker 0030 <gen> Dies
Unit - Hiker 0031 <gen> Dies
Unit - Hiker 0032 <gen> Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
NumberOfPlayers Less than or equal to 0
Then - Actions
Game - Victory Player 12 (Brown) ( 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!
Game - Defeat Player 4 (Purple) with the message: Defeat!
Else - Actions
RedDie
Events
Unit - Hiker 0028 <gen> Dies
Conditions
Actions
Unit Group - Pick every unit in (Units owned by Player 1 (Red).) and do (Remove (Picked unit) from the game)
Set Variable Set NumberOfPlayers = (NumberOfPlayers + -1)
BlueDie
Events
Unit - Hiker 0030 <gen> Dies
Conditions
Actions
Unit Group - Pick every unit in (Units owned by Player 2 (Blue).) and do (Remove (Picked unit) from the game)
Set Variable Set NumberOfPlayers = (NumberOfPlayers + -1)
TealDie
Events
Unit - Hiker 0031 <gen> Dies
Conditions
Actions
Unit Group - Pick every unit in (Units owned by Player 3 (Teal).) and do (Remove (Picked unit) from the game)
Set Variable Set NumberOfPlayers = (NumberOfPlayers + -1)
PurpleDie
Events
Unit - Hiker 0032 <gen> Dies
Conditions
Actions
Unit Group - Pick every unit in (Units owned by Player 4 (Purple).) and do (Remove (Picked unit) from the game)
Set Variable Set NumberOfPlayers = (NumberOfPlayers + -1)
HoboTrainOn
Events
Unit - A unit enters HoboTrainingArea <gen>
Conditions
Actions
Trigger - Turn on HoboTrainCommand <gen>
Game - Display to Player Group - Player 12 (Brown) the text: For (HoboLevel x 7) gold you can give your hobo a level up.
HoboTrainCommand
Events
Player - Player 12 (Brown) types a chat message containing -train (Unexpected type: 'stringnoformat') as An exact match
Conditions
(Player 12 (Brown) Current gold) Greater than or equal to ((Hero level of Hobo) x 7)
Actions
Player - Add ((Hero level of Hobo) x -7) to Player 12 (Brown) . Current gold
Hero - Set Hobo Hero-level to ((Hero level of Hobo) + 1) , Show level-up graphics
Game - Display to Player Group - Player 12 (Brown) the text: You have successfully trained and have gained a level! You are now stronger!
HoboTrainOff
Events
Unit - A unit leaves HoboTrainingArea <gen>
Conditions
Actions
Trigger - Turn off HoboTrainCommand <gen>
HoboLevel
Events
Unit - A unit Gains a level
Conditions
Actions
Game - Display to (All players) the text: The hobo has gained a level! He is now stronger!
RedQuit
Events
Player - Player 1 (Red) leaves the game
Conditions
Actions
Game - Display to (All players) the text: Red has left the game!
Unit Group - Pick every unit in (Units owned by Player 1 (Red).) and do (Remove (Picked unit) from the game)
BlueQuit
Events
Player - Player 2 (Blue) leaves the game
Conditions
Actions
Game - Display to (All players) the text: Blue has left the game!
Unit Group - Pick every unit in (Units owned by Player 2 (Blue).) and do (Remove (Picked unit) from the game)
TealQuit
Events
Player - Player 3 (Teal) leaves the game
Conditions
Actions
Game - Display to (All players) the text: Teal has left the game!
Unit Group - Pick every unit in (Units owned by Player 3 (Teal).) and do (Remove (Picked unit) from the game)
PurpleQuit
Events
Player - Player 4 (Purple) leaves the game
Conditions
Actions
Game - Display to (All players) the text: Purple has left the game!
Unit Group - Pick every unit in (Units owned by Player 4 (Purple).) and do (Remove (Picked unit) from the game)
BrownQuit
Events
Player - Player 12 (Brown) leaves the game
Conditions
Actions
Game - Display to (All players) the text: Brown has left the game!
Player Group - Pick every player in (All players) and do (Victory (Picked player) (Show dialogs, Show scores))
Red
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacked unit)) Equal to Player 1 (Red)
(Owner of (Attacking unit)) Equal to Player 1 (Red)
(Unit-type of (Attacking unit)) Equal to Hiker
Actions
Unit - Kill (Attacked unit)
Blue
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacked unit)) Equal to Player 2 (Blue)
(Owner of (Attacking unit)) Equal to Player 2 (Blue)
(Unit-type of (Attacking unit)) Equal to Hiker
Actions
Unit - Kill (Attacked unit)
Teal
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacked unit)) Equal to Player 3 (Teal)
(Owner of (Attacking unit)) Equal to Player 3 (Teal)
(Unit-type of (Attacking unit)) Equal to Hiker
Actions
Unit - Kill (Attacked unit)
Purple
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacked unit)) Equal to Player 4 (Purple)
(Owner of (Attacking unit)) Equal to Player 4 (Purple)
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.