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
(12)DivideAndConquer mw v0.04.w3x
Variables
Initialization
Melee Initialization
Ally System
Credits and imports
Text
Setup
Ally
War
Not necessary at all
Automat War
Name
Type
is_array
initial_value
Ally_Command
string
No
Color
string
Yes
NumberOfPlayers
integer
No
PlayerName
string
Yes
String
string
No
Unally_Command
string
No
Default melee game initialization for all players
Melee Initialization
Events
Map initialization
Conditions
Actions
Melee Game - Use melee time of day (for all players)
Melee Game - Limit Heroes to 1 per Hero-type (for all players)
Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
Melee Game - Set starting resources (for all players)
Melee Game - Remove creeps and critters from used start locations (for all players)
Melee Game - Create starting units (for all players)
Melee Game - Run melee AI scripts (for computer players)
Melee Game - Enforce victory/defeat conditions (for all players)
Credits goes to cHeRoL.
For bug reporting leave comments at spell system thread or cHeRoL's Hive profile ( http://www.hiveworkshop.com/forums/members/cherol/ )
How to import:
1. Import all variables.
2. Copy triggers - Setup, Ally, War and Automat War -
3. Paste - Setup, Ally, War and Automat War - triggers to your map.
Don't import this trigger.
Text
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Game - Display to (All players) the text: Commands: To ally with someone type |cff00FF00-ally|r and player's number. Ex: -ally 2 (Blue Player)To declare war to someone type |cffFF0000-war|r and player's number. Ex: -war 2 (Blue Player)
Setup
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
-------- Edit if you must. --------
Set Variable Set NumberOfPlayers = "8"
Set Variable Set Ally_Command = "-ally"
Set Variable Set Unally_Command = "-war"
Set Variable Set Color[1] = "red"
Set Variable Set Color[2] = "blue"
Set Variable Set Color[3] = "teal"
Set Variable Set Color[4] = "purple"
Set Variable Set Color[5] = "yellow"
Set Variable Set Color[6] = "orange"
Set Variable Set Color[7] = "green"
Set Variable Set Color[8] = "pink"
Set Variable Set Color[9] = "gray"
Set Variable Set Color[10] = "light blue"
Set Variable Set Color[11] = "dark green"
Set Variable Set Color[12] = "brown"
For each (Integer A) from 1 to NumberOfPlayers , do (Actions)
Loop - Actions
Set Variable Set PlayerName[(Integer A)] = (String((Name of (Player((Integer A))))) as Lower case.)
For each (Integer A) from 1 to NumberOfPlayers , do (Actions)
Loop - Actions
Trigger - Add to Ally <gen> the event ((Player((Integer A))) types a chat message containing Ally_Command as A substring)
Trigger - Add to War <gen> the event ((Player((Integer A))) types a chat message containing Unally_Command as A substring)
Ally
Events
Conditions
Actions
-------- DO NOT EDIT ANYTHING BELOW THIS LINE IF YOU DO NOT KNOW WHAT YOU'RE DOING --------
Set Variable Set String = (String((Entered chat string)) as Lower case.)
For each (Integer A) from 1 to NumberOfPlayers , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
String Equal to ((Ally_Command + ) + (String((Integer A))))
Then - Actions
Player - Make (Triggering player) treat (Player((Integer A))) as an Ally with shared vision
Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cff00FF00has declared an alliance with |r + ((Name of (Player((Integer A)))) + !)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
String Equal to ((Ally_Command + ) + PlayerName[(Integer A)])
Then - Actions
Player - Make (Triggering player) treat (Player((Integer A))) as an Ally with shared vision
Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cff00FF00has declared an alliance with |r + ((Name of (Player((Integer A)))) + !)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
String Equal to ((Ally_Command + ) + Color[(Integer A)])
Then - Actions
Player - Make (Triggering player) treat (Player((Integer A))) as an Ally with shared vision
Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cff00FF00has declared an alliance with |r + ((Name of (Player((Integer A)))) + !)))
Else - Actions
War
Events
Conditions
Actions
-------- DO NOT EDIT ANYTHING BELOW THIS LINE IF YOU DO NOT KNOW WHAT YOU'RE DOING --------
Set Variable Set String = (String((Entered chat string)) as Lower case.)
For each (Integer A) from 1 to NumberOfPlayers , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
String Equal to ((Unally_Command + ) + (String((Integer A))))
Then - Actions
Player - Make (Triggering player) treat (Player((Integer A))) as an Enemy
Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cffFF0000has declared a war with |r + ((Name of (Player((Integer A)))) + !)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
String Equal to ((Unally_Command + ) + PlayerName[(Integer A)])
Then - Actions
Player - Make (Triggering player) treat (Player((Integer A))) as an Enemy
Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cffFF0000has declared a war with |r + ((Name of (Player((Integer A)))) + !)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
String Equal to ((Unally_Command + ) + Color[(Integer A)])
Then - Actions
Player - Make (Triggering player) treat (Player((Integer A))) as an Enemy
Game - Display to (All players) the text: ((Name of (Triggering player)) + ( |cffFF0000has declared a war with |r + ((Name of (Player((Integer A)))) + !)))
Else - Actions
This trigger is not necessary at all.
Example:
If you attack a unit owned by Player 2,you declare war to him.
If 30 seconds passed and nothing happens between you and Player 2,you will be neutral with Player 2.
Automat War
Events
Unit - A unit Is attacked
Conditions
Actions
Player - Make (Owner of (Attacked unit)) treat (Owner of (Attacking unit)) as an Enemy
Player - Make (Owner of (Attacking unit)) treat (Owner of (Attacked unit)) as an Enemy
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.