- Joined
- Jun 20, 2017
- Messages
- 380
Hi, I'm trying to make a voting system (one at a time) where you can only kick allies, there are a few problems that I can't solve!
Yes votes" has to be higher than "No votes" in order to kick someone!
Like you can't kick when there are only 2 players in your team.
And it does not work after 1 time use!
Yes votes" has to be higher than "No votes" in order to kick someone!
Like you can't kick when there are only 2 players in your team.
And it does not work after 1 time use!
-
Setup Active Users
- Events
- Conditions
-
Actions
- Player Group - Add Player 1 (Red) to PlayerGroup_AllPlayers
- Player Group - Add Player 2 (Blue) to PlayerGroup_AllPlayers
- Player Group - Add Player 3 (Teal) to PlayerGroup_AllPlayers
- Player Group - Add Player 4 (Purple) to PlayerGroup_AllPlayers
- Player Group - Add Player 5 (Yellow) to PlayerGroup_AllPlayers
- Player Group - Add Player 6 (Orange) to PlayerGroup_AllPlayers
- Player Group - Add Player 7 (Green) to PlayerGroup_AllPlayers
- Player Group - Add Player 8 (Pink) to PlayerGroup_AllPlayers
- Player Group - Add Player 9 (Gray) to PlayerGroup_AllPlayers
- Player Group - Add Player 10 (Light Blue) to PlayerGroup_AllPlayers
- Player Group - Add Player 11 (Dark Green) to PlayerGroup_AllPlayers
- Player Group - Add Player 12 (Brown) to PlayerGroup_AllPlayers
- -------- --------
-
Player Group - Pick every player in PlayerGroup_AllPlayers and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked player) controller) Equal to User
- ((Picked player) slot status) Equal to Is playing
-
Then - Actions
- Player Group - Add (Picked player) to PlayerGroup_ActiveUsers
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Setup Active Teams
- Events
- Conditions
-
Actions
- Player Group - Add Player 1 (Red) to PlayerGroup_WestTeam
- Player Group - Add Player 2 (Blue) to PlayerGroup_WestTeam
- Player Group - Add Player 3 (Teal) to PlayerGroup_WestTeam
- Player Group - Add Player 4 (Purple) to PlayerGroup_WestTeam
- Player Group - Add Player 5 (Yellow) to PlayerGroup_WestTeam
- Player Group - Add Player 6 (Orange) to PlayerGroup_WestTeam
- -------- --------
-
Player Group - Pick every player in PlayerGroup_WestTeam and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked player) controller) Equal to User
- ((Picked player) slot status) Equal to Is playing
-
Then - Actions
- Player Group - Add (Picked player) to PlayerGroup_WestTeamActive
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- -------- --------
- Player Group - Add Player 7 (Green) to PlayerGroup_EastTeam
- Player Group - Add Player 8 (Pink) to PlayerGroup_EastTeam
- Player Group - Add Player 9 (Gray) to PlayerGroup_EastTeam
- Player Group - Add Player 10 (Light Blue) to PlayerGroup_EastTeam
- Player Group - Add Player 11 (Dark Green) to PlayerGroup_EastTeam
- Player Group - Add Player 12 (Brown) to PlayerGroup_EastTeam
- -------- --------
-
Player Group - Pick every player in PlayerGroup_EastTeam and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked player) controller) Equal to User
- ((Picked player) slot status) Equal to Is playing
-
Then - Actions
- Player Group - Add (Picked player) to PlayerGroup_EastTeamActive
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Votekick
-
Events
- Player - Player 1 (Red) types a chat message containing -kick as An exact match
- Player - Player 2 (Blue) types a chat message containing -kick as An exact match
- Player - Player 3 (Teal) types a chat message containing -kick as An exact match
- Player - Player 4 (Purple) types a chat message containing -kick as An exact match
- Player - Player 5 (Yellow) types a chat message containing -kick as An exact match
- Player - Player 6 (Orange) types a chat message containing -kick as An exact match
- Player - Player 7 (Green) types a chat message containing -kick as An exact match
- Player - Player 8 (Pink) types a chat message containing -kick as An exact match
- Player - Player 9 (Gray) types a chat message containing -kick as An exact match
- Player - Player 10 (Light Blue) types a chat message containing -kick as An exact match
- Player - Player 11 (Dark Green) types a chat message containing -kick as An exact match
- Player - Player 12 (Brown) types a chat message containing -kick as An exact match
-
Conditions
- Boolean_VotekickIsOn Equal to False
-
Actions
- Set VariableSet Player_KickingOut = (Triggering player)
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of players in PlayerGroup_ActiveUsers) Less than or equal to 2
- (Number of players in PlayerGroup_WestTeamActive) Less than or equal to 2
- (Number of players in PlayerGroup_EastTeamActive) Less than or equal to 2
-
Then - Actions
- Game - Display to (All players matching ((Matching player) Equal to Player_KickingOut).) for 10.00 seconds the text: |cffff0000You need ...
- Else - Actions
-
If - Conditions
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Boolean_VotekickIsOn Equal to True
-
Then - Actions
- Game - Display to (All players matching ((Matching player) Equal to Player_KickingOut).) for 10.00 seconds the text: |cffff0000Someone h...
-
Else - Actions
- Set VariableSet Boolean_VotekickIsOn = True
-
If - Conditions
- -------- --------
- Dialog - Clear Dialog_Votekick
- Dialog - Change the title of Dialog_Votekick to Who would you like ...
- -------- --------
-
Player Group - Pick every player in PlayerGroup_ActiveUsers and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Picked player) Not equal to Player_KickingOut
- ((Picked player) is an ally of Player_KickingOut.) Equal to True
-
Then - Actions
- Dialog - Create a dialog button for Dialog_Votekick labelled (Strings_PlayersColor[(Player number of (Picked player))] + ((Name of (Picked player)) + |r))
- Set VariableSet DialogButtons_Votekick[(Player number of (Picked player))] = (Last created dialog Button)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- -------- --------
- Dialog - Create a dialog button for Dialog_Votekick labelled Cancel
- Set VariableSet DialogButton_VotekickCancel = (Last created dialog Button)
- Dialog - Show Dialog_Votekick for Player_KickingOut
- Trigger - Turn on Votekick A Player <gen>
-
Events
-
Votekick A Player
-
Events
- Dialog - A dialog button is clicked for Dialog_Votekick
- Conditions
-
Actions
- Dialog - Hide Dialog_Votekick for Player_KickingOut
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to DialogButton_VotekickCancel
-
Then - Actions
- Set VariableSet Boolean_VotekickIsOn = False
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- -------- --------
-
Player Group - Pick every player in PlayerGroup_ActiveUsers and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to DialogButtons_Votekick[(Player number of (Picked player))]
-
Then - Actions
- Set VariableSet Player_KickedOut = (Picked player)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- -------- --------
- Dialog - Clear Dialog_VotekickVoting
- Dialog - Change the title of Dialog_VotekickVoting to ((Name of Player_KickingOut) + (wants to kick + (Name of Player_KickedOut)))
- Dialog - Create a dialog button for Dialog_VotekickVoting labelled Yes
- Set VariableSet DialogButton_VotekickYes = (Last created dialog Button)
- Dialog - Create a dialog button for Dialog_VotekickVoting labelled No
- Set VariableSet DialogButton_VotekickNo = (Last created dialog Button)
- -------- --------
- Countdown Timer - Start Timer_Votekick as a One-shot timer that will expire in 30.00 seconds
- Set VariableSet Timer_Votekick = (Last started timer)
- Countdown Timer - Create a timer window for Timer_Votekick with title Vote expires in
- Set VariableSet TimerWindow_Votekick = (Last created timer window)
- Countdown Timer - Show TimerWindow_Votekick
- -------- --------
-
Player Group - Pick every player in PlayerGroup_ActiveUsers and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Picked player) Not equal to Player_KickedOut
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Picked player) Not equal to Player_KickingOut
-
Then - Actions
- Dialog - Show Dialog_VotekickVoting for (Picked player)
-
Else - Actions
- Set VariableSet Booleans_PlayerVoted[(Player number of (Picked player))] = True
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Set VariableSet Booleans_PlayerVoted[(Player number of (Picked player))] = True
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- -------- --------
- Set VariableSet Integer_VotekickYes = 1
- Set VariableSet Integer_VotekickNo = 1
- Trigger - Turn on Votekick Voting <gen>
-
Events
-
Votekick Voting
-
Events
- Dialog - A dialog button is clicked for Dialog_VotekickVoting
-
Conditions
- Booleans_PlayerVoted[(Player number of (Triggering player))] Equal to False
-
Actions
- Set VariableSet Booleans_PlayerVoted[(Player number of (Triggering player))] = True
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to DialogButton_VotekickYes
-
Then - Actions
- Set VariableSet Integer_VotekickYes = (Integer_VotekickYes + 1)
-
Else - Actions
- Set VariableSet Integer_VotekickNo = (Integer_VotekickNo + 1)
-
If - Conditions
- -------- --------
- Dialog - Hide Dialog_VotekickVoting for (Triggering player)
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer_VotekickYes + Integer_VotekickNo) Greater than or equal to (Number of players in PlayerGroup_ActiveUsers)
-
Then - Actions
- Trigger - Run Votekick Expired <gen> (checking conditions)
- Else - Actions
-
If - Conditions
-
Events
-
Votekick Cancel
-
Events
- Dialog - A dialog button is clicked for Dialog_VotekickCancel
-
Conditions
- (Clicked dialog button) Equal to DialogButton_VotekickCancel
-
Actions
- Countdown Timer - Hide TimerWindow_Votekick
- Countdown Timer - Destroy TimerWindow_Votekick
-
Events
-
Votekick Expired
-
Events
- Time - Timer_Votekick expires
-
Conditions
- Boolean_VotekickIsOn Equal to True
-
Actions
- Countdown Timer - Hide TimerWindow_Votekick
- Countdown Timer - Destroy TimerWindow_Votekick
- -------- --------
-
Player Group - Pick every player in PlayerGroup_ActiveUsers and do (Actions)
-
Loop - Actions
- Dialog - Hide Dialog_VotekickVoting for (Picked player)
-
Loop - Actions
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (((Real((Number of players in PlayerGroup_ActiveUsers))) / 100.00) x 60.00) Less than or equal to (Real(Integer_VotekickYes))
-
Then - Actions
- Game - Defeat Player_KickedOut with the message: You have been kicke...
- Game - Display to (All players) for 10.00 seconds the text: ((Name of Player_KickedOut) + has been kicked out.)
- Player Group - Remove Player_KickedOut from PlayerGroup_ActiveUsers.
-
Else - Actions
- Game - Display to (All players) for 10.00 seconds the text: |cffff0000Votekick ...
-
If - Conditions
-
Events
Attachments
Last edited: