- Joined
- Jun 8, 2010
- Messages
- 283
In my map, the host is allowed to select the type of game mode through a dialog window and from there the game is selected.
I would like to provide fail-safe triggers for the game type selection system. If the host does not select a game mode within 10 seconds, then the system will automatically run the trigger to allow All players to vote for a game type within a given 10 seconds. The most votes selected for one particular mode will run that game mode. If no votes are accounted for within the allotted 10 seconds for the "All Player" voting interval, then the game will randomly select a mode.
Here is my triggers that I currently have. Its a rough set of triggers however. itd be best if you just create a voting game mode dialog system in a map and upload it so i can adjust accordingly:
Reward: +Rep
I would like to provide fail-safe triggers for the game type selection system. If the host does not select a game mode within 10 seconds, then the system will automatically run the trigger to allow All players to vote for a game type within a given 10 seconds. The most votes selected for one particular mode will run that game mode. If no votes are accounted for within the allotted 10 seconds for the "All Player" voting interval, then the game will randomly select a mode.
Here is my triggers that I currently have. Its a rough set of triggers however. itd be best if you just create a voting game mode dialog system in a map and upload it so i can adjust accordingly:
-
create dialog
-
Events
-
Time - Elapsed game time is 6.50 seconds
-
-
Conditions
-
Actions
-
Dialog - Change the title of dialogwindow to Please Select a Gam...
-
Dialog - Create a dialog button for dialogwindow labelled Squad
-
Set dialogbutton[1] = (Last created dialog Button)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in team_human) Greater than 1
-
-
Then - Actions
-
Dialog - Create a dialog button for dialogwindow labelled Infection
-
Set dialogbutton[2] = (Last created dialog Button)
-
-
Else - Actions
-
-
-------- Survival of the Fittest Button [3] --------
-
Dialog - Create a dialog button for dialogwindow labelled Allow Player Voting
-
Set dialogbutton[4] = (Last created dialog Button)
-
Game - Display to (All players) for 10.00 seconds the text: (Your Host for today is + (Name of Host))
-
-
-
load map
-
Events
-
Time - Elapsed game time is 10.00 seconds
-
-
Conditions
-
Actions
-
Game - Display to (All players) for 5.00 seconds the text: (Please wait 10 seconds while + ((Name of Host) + selects the game mode...))
-
Cinematic - Enable user control for (All players)
-
Dialog - Show dialogwindow for Host
-
-
-
squadron game mode 1
-
Events
-
Dialog - A dialog button is clicked for dialogwindow
-
-
Conditions
-
(Clicked dialog button) Equal to dialogbutton[1]
-
-
Actions
-
Game - Display to (All players) for 10.00 seconds the text: ((Name of Host) + has selected Squad Mode)
-
Unit Group - Pick every unit in team_human and do (Actions)
-
Loop - Actions
-
Unit - Move (Picked unit) instantly to (Random point in start squad mode 1 <gen>), facing Default building facing degrees
-
-
-
Game - Display to (All players) the text: (Humans: + (String((Number of players in playergroup_hu))))
-
Game - Display to (All players) the text: (Zombies: + (String((Number of players in playergroup_zo))))
-
Cinematic - Fade in over 5.00 seconds using texture Black Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Camera - Lock camera target for (Player((Player number of (Picked player)))) to PlayersHero[(Player number of (Picked player))], offset by (0.00, 0.00) using Default rotation
-
Set CurrentCamera[(Player number of (Picked player))] = 2
-
-
-
-
-
infection game mode window 2 squad
-
Events
-
Dialog - A dialog button is clicked for dialogwindow
-
-
Conditions
-
(Clicked dialog button) Equal to dialogbutton[2]
-
-
Actions
-
Dialog - Hide dialogwindow for Host
-
Dialog - Clear dialogwindow
-
Dialog - Change the title of dialogwindow to Infection: Please S...
-
Dialog - Create a dialog button for dialogwindow labelled One Zombie
-
Set dialogbutton[5] = (Last created dialog Button)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in team_human) Greater than 3
-
-
Then - Actions
-
Dialog - Create a dialog button for dialogwindow labelled Two Zombies
-
Set dialogbutton[6] = (Last created dialog Button)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in team_human) Greater than 4
-
-
Then - Actions
-
Dialog - Create a dialog button for dialogwindow labelled Three Zombies
-
Set dialogbutton[7] = (Last created dialog Button)
-
-
Else - Actions
-
-
Dialog - Show dialogwindow for Host
-
-
-
infection one zombie
-
Events
-
Dialog - A dialog button is clicked for dialogwindow
-
-
Conditions
-
(Clicked dialog button) Equal to dialogbutton[5]
-
-
Actions
-
Game - Display to (All players) for 10.00 seconds the text: ((Name of Host) + has selected Infection Mode beginning with One Player Zombie)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
Set zombie_num = (Player number of (Random player from playergroup_hu))
-
Unit Group - Remove PlayersHero[zombie_num] from team_human
-
Unit - Remove PlayersHero[zombie_num] from the game
-
Unit - Create 1 Zombie (Hooked Flesh) for (Player(zombie_num)) at (Center of start squad mode 1 <gen>) facing Default building facing degrees
-
Set zombie_tselect[zombie_num] = (Last created unit)
-
Set PlayersHero[zombie_num] = zombie_tselect[zombie_num]
-
Camera - Lock camera target for (Player(zombie_num)) to PlayersHero[zombie_num], offset by (0.00, 0.00) using Default rotation
-
Unit Group - Add zombie_tselect[zombie_num] to team_zombie
-
Player Group - Remove (Owner of zombie_tselect[zombie_num]) from playergroup_hu
-
Player Group - Add (Owner of zombie_tselect[zombie_num]) to playergroup_zo
-
Player Group - Make playergroup_hu treat playergroup_zo as an Enemy
-
Player Group - Make playergroup_zo treat playergroup_hu as an Enemy
-
Player Group - Make playergroup_zo treat Player Group - Neutral Hostile as an Ally
-
Player Group - Make Player Group - Neutral Hostile treat playergroup_zo as an Ally
-
-
Else - Actions
-
-
Unit Group - Pick every unit in team_human and do (Actions)
-
Loop - Actions
-
Unit - Move (Picked unit) instantly to (Random point in start squad mode 1 <gen>), facing Default building facing degrees
-
-
-
Cinematic - Fade in over 5.00 seconds using texture Black Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
-
Game - Display to (All players) the text: (Humans: + (String((Number of players in playergroup_hu))))
-
Game - Display to (All players) the text: (Zombies: + (String((Number of players in playergroup_zo))))
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
Camera - Lock camera target for (Player((Player number of (Picked player)))) to PlayersHero[(Player number of (Picked player))], offset by (0.00, 0.00) using Default rotation
-
Set CurrentCamera[(Player number of (Picked player))] = 2
-
-
-
-
-
allow player voting 4
-
Events
-
Dialog - A dialog button is clicked for dialogwindow
-
-
Conditions
-
(Clicked dialog button) Equal to dialogbutton[4]
-
-
Actions
-
Game - Display to (All players) for 10.00 seconds the text: ((Name of Host) + has enabled player voting for a game mode.)
-
Dialog - Clear dialogwindow
-
Dialog - Change the title of dialogwindow to Vote for a Game Mod...
-
Dialog - Create a dialog button for dialogwindow labelled Squad
-
Set dialogbutton[1] = (Last created dialog Button)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in team_human) Greater than 1
-
-
Then - Actions
-
Dialog - Create a dialog button for dialogwindow labelled Infection
-
Set dialogbutton[2] = (Last created dialog Button)
-
-
Else - Actions
-
-
-------- Survival of the Fittest Button [3] --------
-
Dialog - Show dialogwindow for Player 1 (Red)
-
Dialog - Show dialogwindow for Player 2 (Blue)
-
Dialog - Show dialogwindow for Player 3 (Teal)
-
Dialog - Show dialogwindow for Player 4 (Purple)
-
Dialog - Show dialogwindow for Player 5 (Yellow)
-
Dialog - Show dialogwindow for Player 6 (Orange)
-
Dialog - Show dialogwindow for Player 7 (Green)
-
Dialog - Show dialogwindow for Player 8 (Pink)
-
Dialog - Show dialogwindow for Player 9 (Gray)
-
Dialog - Show dialogwindow for Player 10 (Light Blue)
-
Dialog - Show dialogwindow for Player 11 (Dark Green)
-
Dialog - Show dialogwindow for Player 12 (Brown)
-
Trigger - Turn on player vote count <gen>
-
Cinematic - Fade in over 5.00 seconds using texture Black Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
-
-
-
player vote count
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
vA[1] Equal to (Number of players in (All players controlled by a User player))
-
vA[2] Equal to (Number of players in (All players controlled by a User player))
-
-
-
-
Then - Actions
-
Trigger - Turn on vote count <gen>
-
Trigger - Turn off player vote count <gen>
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to dialogbutton[1]
-
-
Then - Actions
-
Set vA[1] = (vA[1] + 1)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Clicked dialog button) Equal to dialogbutton[2]
-
-
Then - Actions
-
Set vA[2] = (vA[2] + 1)
-
-
Else - Actions
-
-
-
-
vote count
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
vA[1] Greater than vA[2]
-
-
Then - Actions
-
Set game_mode = Squadron
-
-
Else - Actions
-
Set game_mode = Infection
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
vA[1] Greater than vA[2]
-
-
Then - Actions
-
Set game_mode = Squadron
-
-
Else - Actions
-
Set game_mode = Infection
-
-
-
Game - Display to (All players) for 10.00 seconds the text: (Majority of player votes have selected + game_mode)
-
-