Import:
1. File -> Preferences -> Automaticlay create unknown variables
2, Import the "Ready Check" folder into your map.
Usage:
1. You can set "RC_MaxDuration" if you want to have a time restriction.
Then, to start a new "ReadyCheck":
Trigger - Run RC_Run (ignoring conditions)
2. Events:
Game - RC_Event becomes Equal to 1.00
means a user has voted Yes/No
Game - RC_Event becomes Equal to 2.00
means all valid players have voted
Game - RC_Event becomes Equal to 3.00
means a pending player has left the game and there is no one to vote anymore
Game - RC_Event becomes Equal to 4.00
means the maximum duration expired
Inside the event triggers you can refer to following variables:
integer RC_No_Count ( how many users votes "No")
integer RC_Yes_Count ( how many users votes "Yes")
integer RC_Total_Count ( how many users are total involved in the vote)
- with above integers you easily could calculate something like "remaining votes".
- in case a player leaves it will be substracted correctly from yes/no/total votes automatically
integer RC_Vote[ ] array ( you can use this array to check a certain player's vote state )
- use the PlayerNumber of a player as array index
- value 0 -> not voted
- value 1 -> votes "yes"
- value 2 -> voted "no"
For example if: "RC_Vote[1] == 1" -> this means that Player 1 has voted "yes" already.
================
Credits to HammerFist132, from who's submission I have the idea.
The origin implementation: hiveworkshop.com/threads/ready-check-wow-like-by-hammerfist.235693/