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
Alliance System.w3m
Variables
Test
Test
Alliance System 1.0
Variables
Set Variables
Ally Unally
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 except Custom Script Item. Custom Script Item will merge into map script after globals variables declaration with the list order in trigger view.
Name
Type
is_array
initial_value
AlphabetString
string
Yes
PlayerColorString
string
Yes
StringAllyUnallyFullMessage
string
No
StringAllyUnallyOnly
string
No
Do not copy the folder that contains this trigger. The content of this folder is only for test purposes.
Test
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Game - Display to (All players) for 900.00 seconds the text: Type "ally " or "unally ", with or without hyphen, followed by the player number, player color or name of the player you want to ally or unally. Examples of commands:ally 17Ally blueAlly yellow5e-ALLY TEAL-ally Purpleally allAlly allALLY all-Unally all-unally 24unally PEANUT24Xunally pink8h
For each (Integer A) from 1 to 24 , do (Actions)
Loop - Actions
Unit - Create 1 Peasant for (Player((Integer A))) at (Point((20.00 x (Real((Integer A)))), 0.00)) facing (Center of (Playable map area))
Camera - Lock camera target for Player 1 (Red) to (Last created unit) , offset by ( 0 , 0 ) using Default rotation
Unit - Create 1 Footman for Neutral Hostile at (Center of (Playable map area)) facing (Center of (Playable map area))
Unit - Hide (Last created unit)
Unit - Set Name of (Last created unit) to abcdefghijklmnopqrstuvwxyz
For each (Integer A) from 1 to 24 , do (Actions)
Loop - Actions
Set Variable Set AlphabetString[(Integer A)] = (Substring((Name of (Last created unit)), (Integer A), (Integer A)))
For each (Integer A) from 1 to 24 , do (Actions)
Loop - Actions
Player - Set name of (Player((Integer A))) to ((PlayerColorString[(Integer A)] + (String((Player number of (Player((Integer A))))))) + (String(AlphabetString[(Integer A)]) as Upper case.))
With this simple system that consists of just two short triggers and three variables, a player can treat each one of the 24 players as allied with shared vision or as enemies without shared vision, just by typing "ally " or "unally ", with or without hyphen, followed by the player number, player color or name of the player they want to ally or unally. The system isn't case sensitive; this means you can type "ally" or "unally" in upper or lower case; the same applies for the names of the players or the colors of the players. You can also ally all the players by typing "ally all" or unally all the players by typing "unally all".
The installation is very simple and easy, just copy the folder that contains this trigger.
FAQ
How does alliances work?
If player A gives a command to ally player B, player A will treat player B as an ally but player B will continue treating player A as an enemy. Both players have to type the ally command to have a full alliance.
Created by Paragon/hugope. Give credits if you use this system.
Set Variables
Events
Map initialization
Conditions
Actions
Set Variable Set PlayerColorString[1] = "red"
Set Variable Set PlayerColorString[2] = "blue"
Set Variable Set PlayerColorString[3] = "teal"
Set Variable Set PlayerColorString[4] = "purple"
Set Variable Set PlayerColorString[5] = "yellow"
Set Variable Set PlayerColorString[6] = "orange"
Set Variable Set PlayerColorString[7] = "green"
Set Variable Set PlayerColorString[8] = "pink"
Set Variable Set PlayerColorString[9] = "gray"
Set Variable Set PlayerColorString[10] = "light blue"
Set Variable Set PlayerColorString[11] = "dark green"
Set Variable Set PlayerColorString[12] = "brown"
Set Variable Set PlayerColorString[13] = "maroon"
Set Variable Set PlayerColorString[14] = "navy"
Set Variable Set PlayerColorString[15] = "turquoise"
Set Variable Set PlayerColorString[16] = "violet"
Set Variable Set PlayerColorString[17] = "wheat"
Set Variable Set PlayerColorString[18] = "peach"
Set Variable Set PlayerColorString[19] = "mint"
Set Variable Set PlayerColorString[20] = "lavender"
Set Variable Set PlayerColorString[21] = "coal"
Set Variable Set PlayerColorString[22] = "snow"
Set Variable Set PlayerColorString[23] = "emerald"
Set Variable Set PlayerColorString[24] = "peanut"
With this simple system that consists of just two short triggers and three variables, a player can treat each one of the 24 players as allied with shared vision or as enemies without shared vision, just by typing "ally " or "unally ", with or without hyphen, followed by the player number, player color or name of the player they want to ally or unally. The system isn't case sensitive; this means you can type "ally" or "unally" in upper or lower case; the same applies for the names of the players or the colors of the players. You can also ally all the players by typing "ally all" or unally all the players by typing "unally all".
The installation is very simple and easy, just copy the folder that contains this trigger.
FAQ
How does alliances work?
If player A gives a command to ally player B, player A will treat player B as an ally but player B will continue treating player A as an enemy. Both players have to type the ally command to have a full alliance.
Created by Paragon/hugope. Give credits if you use this system.
Ally Unally
Events
Player - (Player(1)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(2)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(3)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(4)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(5)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(6)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(7)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(8)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(9)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(10)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(11)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(12)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(13)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(14)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(15)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(16)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(17)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(18)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(19)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(20)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(21)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(22)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(23)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Player - (Player(24)) types a chat message containing ally (Unexpected type: 'stringnoformat') as A substring
Conditions
Actions
Set Variable Set StringAllyUnallyFullMessage = (String((Entered chat string)) as Lower case.)
Set Variable Set StringAllyUnallyOnly = ""
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(String((Substring(StringAllyUnallyFullMessage, 1, 5))) as Lower case.) Equal to -ally
(String((Substring(StringAllyUnallyFullMessage, 1, 7))) as Lower case.) Equal to -unally
Then - Actions
Set Variable Set StringAllyUnallyFullMessage = (Substring(StringAllyUnallyFullMessage, 2, (Length of StringAllyUnallyFullMessage)))
Else - Actions
If ((Substring(StringAllyUnallyFullMessage, 1, 4)) Equal to ally) then do (Set VariableSet StringAllyUnallyOnly = (Substring(StringAllyUnallyFullMessage, 1, 4))) else do (Do nothing)
If ((Substring(StringAllyUnallyFullMessage, 1, 6)) Equal to unally) then do (Set VariableSet StringAllyUnallyOnly = (Substring(StringAllyUnallyFullMessage, 1, 6))) else do (Do nothing)
For each (Integer A) from 1 to 24 , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Substring(StringAllyUnallyFullMessage, ((Length of StringAllyUnallyOnly) + 2), 50)) Equal to (String((Player number of (Player((Integer A))))))
(Substring(StringAllyUnallyFullMessage, ((Length of StringAllyUnallyOnly) + 2), 50)) Equal to PlayerColorString[(Integer A)]
(Substring(StringAllyUnallyFullMessage, ((Length of StringAllyUnallyOnly) + 2), 50)) Equal to (String((Name of (Player((Integer A))))) as Lower case.)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
StringAllyUnallyOnly Equal to ally
Then - Actions
Player - Make (Triggering player) treat (Player((Integer A))) as an Ally with shared vision
Else - Actions
Player - Make (Triggering player) treat (Player((Integer A))) as an Enemy
Else - Actions
If ((Substring(StringAllyUnallyFullMessage, 1, 9)) Equal to ally all) then do (For each (Integer A) from 1 to 24, do (Make (Triggering player) treat (Player((Integer A))) as an Ally with shared vision)) else do (Do nothing)
If ((Substring(StringAllyUnallyFullMessage, 1, 11)) Equal to unally all) then do (For each (Integer A) from 1 to 24, do (Make (Triggering player) treat (Player((Integer A))) as an Enemy)) else do (Do nothing)
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.