Hello again, Im back with yet another question.
I made an alliance trigger (like you type -ally red and become red's ally) but it doesn't work. Ill post it here, and if anyone could help me figure out why it's broken, then I will thank you greatly.
I made an alliance trigger (like you type -ally red and become red's ally) but it doesn't work. Ill post it here, and if anyone could help me figure out why it's broken, then I will thank you greatly.
Code:
Set String Variables
Events
Map initialization
Conditions
Actions
Set Teamstring[1] = Red
Set Teamstring[2] = Blue
Set Teamstring[3] = Teal
Set Teamstring[4] = Purple
Set Teamstring[5] = Yellow
Set Teamstring[6] = Orange
Set Teamstring[7] = Green
Set Teamstring[8] = Pink
Set Teamstring[9] = Gray
Set Teamstring[10] = Light Blue
Set Teamstring[11] = Dark Green
Code:
Ally
Events
Player - Player 1 (Red) types a chat message containing -ally as A substring
Player - Player 2 (Blue) types a chat message containing -ally as A substring
Player - Player 3 (Teal) types a chat message containing -ally as A substring
Player - Player 4 (Purple) types a chat message containing -ally as A substring
Player - Player 5 (Yellow) types a chat message containing -ally as A substring
Player - Player 6 (Orange) types a chat message containing -ally as A substring
Player - Player 7 (Green) types a chat message containing -ally as A substring
Player - Player 8 (Pink) types a chat message containing -ally as A substring
Player - Player 9 (Gray) types a chat message containing -ally as A substring
Player - Player 10 (Light Blue) types a chat message containing -ally as A substring
Player - Player 11 (Dark Green) types a chat message containing -ally as A substring
Conditions
(Substring((Entered chat string), 1, 6)) Equal to -ally
Actions
For each (Integer A) from 1 to 11, do (Actions)
Loop - Actions
If ((Substring(Teamstring[(Integer A)], 1, 5)) Equal to (Substring((Entered chat string), 7, 12))) then do (Player - For (Triggering player), turn Alliance (non-aggression) On toward (Player((Integer A)))) else do (Do nothing)
If ((Substring(Teamstring[(Integer A)], 1, 5)) Equal to (Substring((Entered chat string), 7, 12))) then do (Player - For (Triggering player), turn Shared vision On toward (Player((Integer A)))) else do (Do nothing)
Code:
Unally
Events
Player - Player 1 (Red) types a chat message containing -unally as A substring
Player - Player 2 (Blue) types a chat message containing -unally as A substring
Player - Player 3 (Teal) types a chat message containing -unally as A substring
Player - Player 4 (Purple) types a chat message containing -unally as A substring
Player - Player 5 (Yellow) types a chat message containing -unally as A substring
Player - Player 6 (Orange) types a chat message containing -unally as A substring
Player - Player 7 (Green) types a chat message containing -unally as A substring
Player - Player 8 (Pink) types a chat message containing -unally as A substring
Player - Player 9 (Gray) types a chat message containing -unally as A substring
Player - Player 10 (Light Blue) types a chat message containing -unally as A substring
Player - Player 11 (Dark Green) types a chat message containing -unally as A substring
Conditions
(Substring((Entered chat string), 1, 8)) Equal to -unally
Actions
For each (Integer A) from 1 to 11, do (Actions)
Loop - Actions
If ((Substring(Teamstring[(Integer A)], 1, 5)) Equal to (Substring((Entered chat string), 7, 12))) then do (Player - For (Triggering player), turn Alliance (non-aggression) Off toward (Player((Integer A)))) else do (Do nothing)
If ((Substring(Teamstring[(Integer A)], 1, 5)) Equal to (Substring((Entered chat string), 7, 12))) then do (Player - For (Triggering player), turn Shared vision Off toward (Player((Integer A)))) else do (Do nothing)