• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Ready Check v1.1

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

  • 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
  • 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
  • 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
  • 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)

  • 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
Code:
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)

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.
 
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
 
Top