- Joined
- Apr 23, 2010
- Messages
- 312
So iv'e been working on an advanced alliance system where when (for example) Blue wants to ally Red he types "-ally red" and that brings up a dialog box for Red and another for Blue. Red's dialog box asks whether or not he/she would like to accept or decline the alliance, where as Blue's box just says Waiting for Red. My question is how do I make it so this DOESN'T happen? When Red has NOT accepted or declined the alliance request, and (for example) Teal wants an alliance with Purple, it will change my "Allying_Player" variable to teal instead of blue. Below are the triggers that make this work, and I do plan on adding a 10 second timer for the player to make a decision.
This is the trigger for what happens when a player types "-ally red", there are 7 others for the other players.
This is the trigger for what happens when a player types "-ally red", there are 7 others for the other players.
-
Ally Red
-
Events
- Player - Player 2 (Blue) types a chat message containing -ally red as An exact match
- Player - Player 3 (Teal) types a chat message containing -ally red as An exact match
- Player - Player 4 (Purple) types a chat message containing -ally red as An exact match
- Player - Player 5 (Yellow) types a chat message containing -ally red as An exact match
- Player - Player 6 (Orange) types a chat message containing -ally red as An exact match
- Player - Player 7 (Green) types a chat message containing -ally red as An exact match
- Player - Player 8 (Pink) types a chat message containing -ally red as An exact match
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Player 1 (Red) slot status) Equal to Is playing) and ((Player 1 (Red) controller) Equal to User)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Triggering player) is an ally of Player 1 (Red)) Equal to True
-
Then - Actions
- Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: You are already all...
-
Else - Actions
- Set Allying_Player = (Triggering player)
- Dialog - Clear Dialog_Box[0]
- Dialog - Change the title of Dialog_Box[0] to ((Name of (Triggering player)) + would like to ally with you, would you like to form an alliance? You can always unally this player later.)
- Dialog - Create a dialog button for Dialog_Box[0] labelled Accept
- Set Dialog_Button[0] = (Last created dialog Button)
- Dialog - Create a dialog button for Dialog_Box[0] labelled Decline
- Set Dialog_Button[1] = (Last created dialog Button)
- Dialog - Show Dialog_Box[0] for Player 1 (Red)
- Dialog - Clear Dialog_Box[1]
- Dialog - Change the title of Dialog_Box[1] to (Waiting for + ((Name of Player 1 (Red)) + to decide the alliance...))
- Dialog - Show Dialog_Box[1] for (Triggering player)
- Trigger - Turn on Red Ally Decision <gen>
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: There is no one the...
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Red Ally Decision
-
Events
- Dialog - A dialog button is clicked for Dialog_Box[0]
-
Conditions
- (Triggering player) Equal to Player 1 (Red)
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to Dialog_Button[0]
-
Then - Actions
- Player - Make Player 1 (Red) treat Allying_Player as an Ally with shared vision
- Player - Make Allying_Player treat Player 1 (Red) as an Ally with shared vision
- Game - Display to (Player group(Allying_Player)) for 10.00 seconds the text: ((|cffffcc00 + (Name of Player 1 (Red))) + |r accepted your alliance!)
- Game - Display to Player Group - Player 1 (Red) for 10.00 seconds the text: ((|cffffcc00 + (Name of (Triggering player))) + |r and you are now allies!)
-
Else - Actions
- Game - Display to (Player group(Allying_Player)) for 10.00 seconds the text: ((|cffffcc00 + (Name of (Triggering player))) + |r declined the alliance!)
-
If - Conditions
- Dialog - Hide Dialog_Box[0] for Player 1 (Red)
- Dialog - Hide Dialog_Box[1] for Allying_Player
- Trigger - Turn off (This trigger)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events