1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Head to the 33rd Modeling Contest Poll and drink to your heart's desire.
    Dismiss Notice
  3. Choose your means of doom in the 17th Mini Mapping Contest Poll.
    Dismiss Notice
  4. A slave to two rhythms, the 22nd Terraining Contest is here.
    Dismiss Notice
  5. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  6. The die is cast - the 6th Melee Mapping Contest results have been announced. Onward to the Hive Cup!
    Dismiss Notice
  7. The glory of the 20th Icon Contest is yours for the taking!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Ready Check v1.1

Submitted by HammerFist132, IcemanBo
This bundle is marked as approved. It works and satisfies the submission rules.
Introduction

There are some resources on hive which have a good idea, but are not implemented very good.
I want to re-create some of them from which I think are useful. I will mark the original author as co-author.
That's one of these resources.

Credits to HammerFist132, from who's submission I have the idea.
The original implementation: www.hiveworkshop.com/threads/ready-check-wow-like-by-hammerfist.235693/

Information

ReadyCheck is a very simple system with which you can check if current players are ready to start.
It will create a dialog with the vote options "Yes" and "No" and you can read needed data whenever a player cliked something.

Triggers

Init
  • RC Init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- --------------------------------------------------------------------- --------
      • -------- Maybe you need to set this trigger again. --------
      • -------- --------------------------------------------------------------------- --------
      • Set RC_Run = RC Start <gen>
      • -------- --------------------------------------------------------------------- --------
      • -------- Nothing to config here. --------
      • -------- Read the Readme --------
      • -------- --------------------------------------------------------------------- --------
      • Dialog - Change the title of RC_Dialog to Are you ready?
      • Dialog - Create a dialog button for RC_Dialog labelled Yes
      • Set RC_ButtonYes = (Last created dialog Button)
      • Dialog - Create a dialog button for RC_Dialog labelled No
      • Set RC_ButtonNo = (Last created dialog Button)
      • For each (Integer RC_Integer) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set RC_Player = (Player(RC_Integer))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (RC_Player controller) Equal to User
              • (RC_Player slot status) Equal to Is playing
            • Then - Actions
              • Trigger - Add to RC Leave <gen> the event (Player - RC_Player leaves the game)
            • Else - Actions


Start
  • RC Start
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RC_MaxDuration Greater than 0.00
        • Then - Actions
          • Countdown Timer - Start RC_Clock as a One-shot timer that will expire in RC_MaxDuration seconds
        • Else - Actions
          • Countdown Timer - Pause RC_Clock
      • Trigger - Turn on RC Leave <gen>
      • Set RC_Yes_Count = 0
      • Set RC_Total_Count = 0
      • Set RC_No_Count = 0
      • Set RC_MaxDuration = 0.00
      • For each (Integer RC_Integer) from 1 to 12, do (Actions)
        • Loop - Actions
          • -------- --------------------------------------------------------------------- --------
          • -------- See Click trigger to see what the Vote variable stands for --------
          • -------- --------------------------------------------------------------------- --------
          • Set RV_Vote[(Player number of RC_Player)] = 0
          • -------- --------------------------------------------------------------------- --------
          • Set RC_Player = (Player(RC_Integer))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (RC_Player controller) Equal to User
              • (RC_Player slot status) Equal to Is playing
            • Then - Actions
              • Dialog - Show RC_Dialog for RC_Player
              • Set RC_Total_Count = (RC_Total_Count + 1)
            • Else - Actions


Click
  • RC Click
    • Events
      • Dialog - A dialog button is clicked for RC_Dialog
    • Conditions
    • Actions
      • -------- --------------------------------------------------------------------- --------
      • -------- System-only relevant: --------
      • -------- vote = 0 -> not voted --------
      • -------- vote = 1 -> voted "yes" --------
      • -------- vote = 2 -> voted "no" --------
      • -------- --------------------------------------------------------------------- --------
      • Set RC_Player = (Triggering player)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to RC_ButtonYes
        • Then - Actions
          • Set RV_Vote[(Player number of RC_Player)] = 1
          • Set RC_Yes_Count = (RC_Yes_Count + 1)
        • Else - Actions
          • Set RV_Vote[(Player number of RC_Player)] = 2
          • Set RC_No_Count = (RC_No_Count + 1)
      • Set RC_Event = 1.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RC_Total_Count Equal to (RC_No_Count + RC_Yes_Count)
        • Then - Actions
          • Set RC_Event = 2.00
          • Countdown Timer - Pause RC_Clock
          • Trigger - Turn off RC Leave <gen>
        • Else - Actions
      • Set RC_Event = 0.00


Leave
  • RC Leave
    • Events
    • Conditions
    • Actions
      • Set RC_Player = (Triggering player)
      • -------- --------------------------------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RV_Vote[(Player number of RC_Player)] Equal to 0
        • Then - Actions
          • Set RC_Total_Count = (RC_Total_Count - 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RC_Total_Count Equal to (RC_No_Count + RC_Yes_Count)
            • Then - Actions
              • Set RC_Event = 3.00
              • Set RC_Event = 0.00
              • Countdown Timer - Pause RC_Clock
              • Trigger - Turn off RC Leave <gen>
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RV_Vote[(Player number of RC_Player)] Equal to 1
        • Then - Actions
          • Set RC_Yes_Count = (RC_Yes_Count - 1)
        • Else - Actions
          • Set RC_No_Count = (RC_No_Count - 1)


End

  • Rc End
    • Events
      • Time - RC_Clock expires
    • Conditions
    • Actions
      • For each (Integer RC_Integer) from 1 to 12, do (Actions)
        • Loop - Actions
          • Dialog - Hide RC_Dialog for (Player(RC_Integer))
      • Set RC_Event = 4.00
      • Set RC_Event = 0.00


Readme
Code (Text):

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/


 
Contents

Ready Check v1.1 (Map)

  1. Emm-A-

    Emm-A-

    Joined:
    Jul 1, 2008
    Messages:
    1,312
    Resources:
    0
    Resources:
    0
    Hey there,

    You should maybe include the option to run a timer, that will close all dialogs after some time. That may help if some players are inactive for some time but did not leave the game...
     
  2. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,532
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    I ve also thought about it, but screwed it again because I somehow thought the user should handle it himself.

    On one side I find it counter intuitive automaticaly to cancel an "Are you ready" check, plus, it's also not intuitivly for the user to implement what exactly to do when the timer finished with only X % of people who have totaly voted -- but on the other side it might be just a handy feature in case the user really wants a clear time limit.

    I will just implement it tomorrow or so, thanks.
     
  3. Emm-A-

    Emm-A-

    Joined:
    Jul 1, 2008
    Messages:
    1,312
    Resources:
    0
    Resources:
    0
    yeah, your thoughts completely make sense to me, I think some may want it some not, anyway I am glad I could help you a tiny bit with my suggestion :)
     
  4. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,532
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    Added 2 new events, one of them is the time restriction.
     
  5. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,502
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Another simple, yet effective system by the IcemanBo. Even though the events and No_Count, Yes_Count, and Total_Count variables hit just the right spot in my pleasure center, The RC_Vote[] array has to be my favorite. A great idea with great execution.

    Needs Fixed


    • Nothing

    Suggestions


    • RC is too generic for a variable prefix. This can cause issues if the user happens to have the same prefix in their map

    Status


    Approved