Hello, im making a voting system for different terrains the map will be played in.
Everything is working (i think, have not tested with multiple people yet). But the MapSelectionBoolean is messing with me a bit.
No matter what button is pressed, it will always choose every single one. Am i wrong doing this inside of the loop?
Everything is working (i think, have not tested with multiple people yet). But the MapSelectionBoolean is messing with me a bit.
No matter what button is pressed, it will always choose every single one. Am i wrong doing this inside of the loop?
-
Map Selection Inst
-
Events
- Map initialization
- Conditions
-
Actions
- -------- --------
- Set VariableSet MapSelectionBoolean[1] = False
- Set VariableSet MapSelectionBoolean[2] = False
- Set VariableSet MapSelectionBoolean[3] = False
- Set VariableSet MapSelectionBoolean[4] = False
- Set VariableSet MapSelectionBoolean[5] = False
- Set VariableSet MapSelectionBoolean[6] = False
- -------- --------
- Set VariableSet MapTotalAreas = 6
- -------- --------
- Set VariableSet MapSelection_Name[1] = |cff008000Forest|r
- Set VariableSet MapSelection_Name[2] = |cff00ffffOcean|r
- Set VariableSet MapSelection_Name[3] = |cff8b4513Mountain|r
- Set VariableSet MapSelection_Name[4] = |cfffffacdSavannah|r
- Set VariableSet MapSelection_Name[5] = |cffc8c8ffWinter|r
- Set VariableSet MapSelection_Name[6] = |cff800000Hell|r|cff800000Hell|r
- -------- --------
- Set VariableSet TotalPlayers = (All players matching ((((Matching player) slot status) Equal to Is playing) and (((Matching player) Not equal to Player 12 (Brown)) and ((Matching player) Not equal to Player 11 (Dark Green)))).)
- -------- --------
-
Events
-
Map Selection Dialog
-
Events
- Time - Elapsed game time is 1.00 seconds
- Conditions
-
Actions
- -------- --------
- -------- Will be used later --------
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Player number of (Picked player)) Less than or equal to 4
- ((Picked player) controller) Equal to User
- ((Picked player) slot status) Equal to Is playing
-
Then - Actions
- Player Group - Add (Picked player) to Team1
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Player number of (Picked player)) Greater than 4
- (Player number of (Picked player)) Less than or equal to 8
- ((Picked player) controller) Equal to User
- ((Picked player) slot status) Equal to Is playing
-
Then - Actions
- Player Group - Add (Picked player) to Team2
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- -------- --------
- Set VariableSet MapSelection_TotalPlayers = (Number of players in TotalPlayers)
- Dialog - Clear MapSelection
- Dialog - Change the title of MapSelection to Vote terrain
- -------- --------
- Dialog - Create a dialog button for MapSelection labelled |cff008000Forest|r
- Set VariableSet MapSelctionButton[1] = (Last created dialog Button)
- Set VariableSet MapVotingInteger[1] = 1
- -------- --------
- Dialog - Create a dialog button for MapSelection labelled |cff00ffffOcean|r
- Set VariableSet MapSelctionButton[2] = (Last created dialog Button)
- Set VariableSet MapVotingInteger[2] = 1
- -------- --------
- Dialog - Create a dialog button for MapSelection labelled |cff8b4513Mountain|r
- Set VariableSet MapSelctionButton[3] = (Last created dialog Button)
- Set VariableSet MapVotingInteger[3] = 1
- -------- --------
- Dialog - Create a dialog button for MapSelection labelled |cfffffacdSavannah|r
- Set VariableSet MapSelctionButton[4] = (Last created dialog Button)
- Set VariableSet MapVotingInteger[4] = 1
- -------- --------
- Dialog - Create a dialog button for MapSelection labelled |cffc8c8ffWinter|r
- Set VariableSet MapSelctionButton[5] = (Last created dialog Button)
- Set VariableSet MapVotingInteger[5] = 1
- -------- --------
- Dialog - Create a dialog button for MapSelection labelled |cff800000Hell|r
- Set VariableSet MapSelctionButton[6] = (Last created dialog Button)
- Set VariableSet MapVotingInteger[6] = 1
- -------- --------
-
Player Group - Pick every player in TotalPlayers and do (Actions)
-
Loop - Actions
- Dialog - Show MapSelection for (Picked player)
- Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across Right Side Vision <gen>
- Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across Left Side Vision <gen>
-
Loop - Actions
-
Events
-
Map Selection Button
-
Events
- Dialog - A dialog button is clicked for MapSelection
- Conditions
-
Actions
- -------- --------
- Set VariableSet MapSelection_PlayerClicked = (MapSelection_PlayerClicked + 1)
- Dialog - Hide MapSelection for (Triggering player)
- -------- --------
-
For each (Integer MapSelection_Loop) from 1 to MapTotalAreas, do (Actions)
-
Loop - Actions
- -------- --------
- Set VariableSet MapVotingInteger[MapSelection_Loop] = (MapVotingInteger[MapSelection_Loop] + 1)
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Clicked dialog button) Equal to MapSelctionButton[MapSelection_Loop]
-
Then - Actions
- -------- --------
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
- Game - Display to (Player group((Picked player))) for 30.00 seconds the text: ((Color_Text[(Player number of (Triggering player))] + ((Name of (Triggering player)) + |r)) + ( voted for + MapSelection_Name[MapSelection_Loop]))
-
Loop - Actions
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MapSelection_PlayerClicked Equal to MapSelection_TotalPlayers
-
Then - Actions
- -------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MapSelectionBoolean[MapSelection_Loop] Equal to True
-
Then - Actions
- Environment - Create at (Playable map area) the weather effect Ashenvale Rain (Heavy)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MapSelectionBoolean[MapSelection_Loop] Equal to True
-
Then - Actions
- Environment - Create at (Playable map area) the weather effect Dungeon Green Fog (Light)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- -------- --------
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Events