Tutorial Voting System

PureOwnage

Minecraft Server OP, Inactive.
Reaction score
72
Voting System by PureOwnage

Table of Contents
I: What is a Voting System?
II: How do I make it?
II:1 Making the buttons and dialog
II:2 Giving your Vote
II:3 Winning Triggers
II:4 Result Triggers
II:5 Difficulty Triggers
III: Tips and Tricks
IV: Wrap Up

What is a Voting System?
A voting system is a system run by dialogs and variables. A voting system can be used to create a fair kicking system, a way of fairly selecting modes and many more useful systems. There are at least 3 variables for the casting the vote, winning, and setting the difficulty for every difficulty. Also, 4 variables for the dialog box and buttons. For more tips for the this system, look at the tips and tricks located near the bottom of this post.

How do I make it?
Well first of all, I suggest you study dialog basics made by AceHart: http://world-editor-tutorials.thehelper.net/dialogs.php

II:1 Making the buttons and dialog

This voting system is based for TD's.

Starting off, you will need 5 variables. Online_Players (As a player group); Players_User (As a player group also); Easy , Normal, and Hard (As a dialog button), and finally for the most important part, make a variable called Voting (as a Dialog)

Set Online_Players to this:
Code:
Set Online_Players = (All players matching (((Matching player) slot status) Equal to Is playing))

And Players_User to this:
Code:
Set Players_User = (All players controlled by a User player)

Then we need to make the dialog box and the dialog buttons by doing this:
Code:
Dialog
    Events
        Time - Elapsed game time is 4.00 seconds
    Conditions
    Actions
        Set Online_Players = (All players matching (((Matching player) slot status) Equal to Is playing))
        Set Players_User = (All players controlled by a User player)
        Dialog - Clear Voting
        Dialog - Change the title of Voting to Difficulty
        Dialog - Create a dialog button for Voting labelled Easy - 5 Armor Redu...
        Set Easy = (Last created dialog Button)
        Dialog - Create a dialog button for Voting labelled Normal - 0 Armor Re...
        Set Normal = (Last created dialog Button)
        Dialog - Create a dialog button for Voting labelled Hard - 5 Armor Bonus
        Set Hard = (Last created dialog Button)
        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
                        ((Picked player) is in Online_Players) Equal to True
                        ((Picked player) is in Players_User) Equal to True
                    Then - Actions
                        Dialog - Show Voting for (Picked player)
                    Else - Actions
                        Do nothing
The variables will detect if a player is a user and if he or she is playing.

It should look like this so far:
DialogFix3.png


II:2 Giving your Vote

Create 3 variables, EasyVote, NormalVote, and HardVote (real variables)
And then make three different triggers.
Code:
Easy Vote
    Events
        Dialog - A dialog button is clicked for Voting
    Conditions
        (Clicked dialog button) Equal to Easy
    Actions
[JASS]
Custom script:   call DisplayTextToPlayer( Player(0), 0, 0, GetPlayerName( Player(0) ) + " has voted for Easy" )
[/JASS]
Set EasyVote = (EasyVote + 1.00)
Code:
Normal Vote
    Events
        Dialog - A dialog button is clicked for Voting
    Conditions
        (Clicked dialog button) Equal to Normal
    Actions
[JASS]Custom script:   call DisplayTextToPlayer( Player(0), 0, 0, GetPlayerName( Player(0) ) + " has voted for Normal" )[/JASS]
Set NormalVote = (NormalVote + 1.00)
Code:
Hard Vote
    Events
        Dialog - A dialog button is clicked for Voting
    Conditions
        (Clicked dialog button) Equal to Hard
    Actions
[JASS]Custom script:   call DisplayTextToPlayer( Player(0), 0, 0, GetPlayerName( Player(0) ) + " has voted for Hard" )[/JASS]
Set HardVote = (HardVote + 1.00)
It should look something like this:
Dialog2.png

II:3 Winning Triggers
Make 3 variables, EasyDiff, NormalDiff, and HardDiff (all boolean)
Add some text saying that easy ,normal , and hard won and it should look like this:
DialogFix2.png


II:4 Result Triggers

Well people may want to know how many votes a difficulty got so to make it, do this:
Code:
TimeUp
    Events
        Time - Elapsed game time is 10.00 seconds
    Conditions
    Actions
        Game - Display to (All players) the text: |c0000FF00NOTICE:|r Voting has ended.
        Game - Display to (All players) the text: |c00FFFF00Results:|r
        Game - Display to (All players) the text: <Empty String>
        Game - Display to (All players) the text: (|c0000FF00Easy:|r + (String(EasyVote)))
        Game - Display to (All players) the text: (|c00FFFF00Normal:|r + (String(NormalVote)))
        Game - Display to (All players) the text: (|c00FF0000Hard:|r + (String(HardVote)))
        Set TimeUp = True
The empty string is only for spacing. It will make your Results look better....
It should look like this:
TimeUp.png


II:5 Difficulty Triggers

Time to give the modifiers!
Make a trigger similar to this:
DialogFix.png

You can modify the part where it says a unit enters Buff.
This is based off a TD map so you can change it so that you put a whole entire map under a region called buff.

Making the spells are easy. Make 3 similar spells to Spiked Carapace each having a different defense bonus.

III: Tips and Tricks

Other ways to use this system is to use different bonus effects and buffs. For example, you can do something like -20 speed for easy, 0 for normal, and +20 for hard. Giving color to your voting system makes it more appealing to the eye.

IV: Wrap Up
Thank you for looking at this tutorial.
Please note that the example map is not made in Jass NewGen because I am currently using version 1.22

Changelog (Tutorial):

Version 1.01: Fixed Winning Triggers
Version 1.02: Fixed Grammar Errors
Version 1.03: Made Dialog Easier to Make

Changelog (System):
Version 1.01: Made Result System
 

Attachments

  • VotingSystem.w3x
    29.3 KB · Views: 466
Issue with the II:3 Winning Triggers section.

You have one trigger testing if NormalVote is greater then EasyVote. You also have a trigger testing if HardVote is greater then NormalVote and EasyVote.
These could both return true, causing it to add both the Normal and Hard bonuses.

Also, in II:4 Difficulty Triggers you check if NormalDiff is true, but then add the Easy Mode ability.
 
Issue with the II:3 Winning Triggers section.

You have one trigger testing if NormalVote is greater then EasyVote. You also have a trigger testing if HardVote is greater then NormalVote and EasyVote.
These could both return true, causing it to add both the Normal and Hard bonuses.

Also, in II:4 Difficulty Triggers you check if NormalDiff is true, but then add the Easy Mode ability.
Thanks for correcting me about the trigger.
I see the problem. Thanks :D
 
Another thing I find odd: The setup of this trigger
Code:
Dialog
    Events
        Time - Elapsed game time is 4.00 seconds
    Conditions
    Actions
        Set Online_Players = (All players matching (((Matching player) slot status) Equal to (==) Is playing))
        Set Players_User = (All players controlled by a User player)
        Dialog - Clear Voting
        Dialog - Change the title of Voting to Difficulty
        Dialog - Create a dialog button for Voting labelled Easy - 5 Armor Redu...
        Set Easy = (Last created dialog Button)
        Dialog - Create a dialog button for Voting labelled Normal - 0 Armor Re...
        Set Normal = (Last created dialog Button)
        Dialog - Create a dialog button for Voting labelled Hard - 5 Armor Bonu...
        Set Hard = (Last created dialog Button)
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 1 (Red) is in Online_Players) Equal to (==) True
                (Player 1 (Red) is in Players_User) Equal to (==) True
            Then - Actions
                Dialog - Show Voting for Player 1 (Red)
            Else - Actions
                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 2 (Blue) is in Online_Players) Equal to (==) True
                        (Player 2 (Blue) is in Players_User) Equal to (==) True
                    Then - Actions
                        Dialog - Show Voting for Player 2 (Blue)
                    Else - Actions
                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 3 (Teal) is in Online_Players) Equal to (==) True
                                ((Picked player) is in Players_User) Equal to (==) True
                            Then - Actions
                                Dialog - Show Voting for Player 3 (Teal)
                            Else - Actions
                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 4 (Purple) is in Online_Players) Equal to (==) True
                                (Player 4 (Purple) is in Players_User) Equal to (==) True
                            Then - Actions
                                Dialog - Show Voting for Player 4 (Purple)
                            Else - Actions
                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 5 (Yellow) is in Online_Players) Equal to (==) True
                                (Player 5 (Yellow) is in Players_User) Equal to (==) True
                            Then - Actions
                                Dialog - Show Voting for Player 5 (Yellow)
                            Else - Actions
                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 6 (Orange) is in Online_Players) Equal to (==) True
                                (Player 6 (Orange) is in Players_User) Equal to (==) True
                            Then - Actions
                                Dialog - Show Voting for Player 6 (Orange)
                            Else - Actions
                                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Player 7 (Green) is in Online_Players) Equal to (==) True
                                        (Player 7 (Green) is in Players_User) Equal to (==) True
                                    Then - Actions
                                        Dialog - Show Voting for Player 7 (Green)
                                    Else - Actions
                                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Player 8 (Pink) is in Online_Players) Equal to (==) True
                                        (Player 8 (Pink) is in Players_User) Equal to (==) True
                                    Then - Actions
                                        Dialog - Show Voting for Player 8 (Pink)
                                    Else - Actions
                                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Player 9 (Gray) is in Online_Players) Equal to (==) True
                                                (Player 9 (Gray) is in Players_User) Equal to (==) True
                                            Then - Actions
                                                Dialog - Show Voting for Player 9 (Gray)
                                            Else - Actions
                                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Player 10 (Light Blue) is in Online_Players) Equal to (==) True
                                                (Player 10 (Light Blue) is in Players_User) Equal to (==) True
                                            Then - Actions
                                                Dialog - Show Voting for Player 10 (Light Blue)
                                            Else - Actions
                                                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (Player 11 (Dark Green) is in Online_Players) Equal to (==) True
                                                        (Player 11 (Dark Green) is in Players_User) Equal to (==) True
                                                    Then - Actions
                                                        Dialog - Show Voting for Player 11 (Dark Green)
                                                    Else - Actions
                                                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (Player 12 (Brown) is in Online_Players) Equal to (==) True
                                                        (Player 12 (Brown) is in Players_User) Equal to (==) True
                                                    Then - Actions
                                                        Dialog - Show Voting for Player 12 (Brown)
                                                    Else - Actions
                                                        Do nothing
Why don't you simply do this? It's much shorter, and does the same thing.
Code:
Dialog
    Events
        Time - Elapsed game time is 4.00 seconds
    Conditions
        (Player 1 (Red) is in Online_Players) Equal to (==) True
        (Player 1 (Red) is in Players_User) Equal to (==) True
    Actions
        Set Online_Players = (All players matching (((Matching player) slot status) Equal to (==) Is playing))
        Set Players_User = (All players controlled by a User player)
        Dialog - Clear Voting
        Dialog - Change the title of Voting to Difficulty
        Dialog - Create a dialog button for Voting labelled Easy - 5 Armor Redu...
        Set Easy = (Last created dialog Button)
        Dialog - Create a dialog button for Voting labelled Normal - 0 Armor Re...
        Set Normal = (Last created dialog Button)
        Dialog - Create a dialog button for Voting labelled Hard - 5 Armor Bonu...
        Set Hard = (Last created dialog Button)
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) is in Online_Players) Equal to (==) True
                        ((Picked player) is in Players_User) Equal to (==) True
                    Then - Actions
                        Dialog - Show Voting for (Picked player)
                    Else - Actions
 
Hey~Ricky

Apart from what tbr found I have only one problem, it isnt important or anything, but in your "What is a voting system" Section you could explain what you can use them for, a bit more description required methinks.

I'm probably the only person who feels that way though :p

Overall though I tihnk it is a very nice tut, +rep :thup:
 
That's an awesome moment to make a Tutorial on this, since so many have asked for voting system lately (i think) ^^. I'll check the tutorial and edit my post for C&C.

It's seem like a really good simple to implement and to understand system, if i ever was i need for stuff like this, this tutorial would be the first i would look at ^^. Good job, +rep.
 
Another thing I find odd: The setup of this trigger
Code:
Dialog
    Events
        Time - Elapsed game time is 4.00 seconds
    Conditions
    Actions
        Set Online_Players = (All players matching (((Matching player) slot status) Equal to (==) Is playing))
        Set Players_User = (All players controlled by a User player)
        Dialog - Clear Voting
        Dialog - Change the title of Voting to Difficulty
        Dialog - Create a dialog button for Voting labelled Easy - 5 Armor Redu...
        Set Easy = (Last created dialog Button)
        Dialog - Create a dialog button for Voting labelled Normal - 0 Armor Re...
        Set Normal = (Last created dialog Button)
        Dialog - Create a dialog button for Voting labelled Hard - 5 Armor Bonu...
        Set Hard = (Last created dialog Button)
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 1 (Red) is in Online_Players) Equal to (==) True
                (Player 1 (Red) is in Players_User) Equal to (==) True
            Then - Actions
                Dialog - Show Voting for Player 1 (Red)
            Else - Actions
                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 2 (Blue) is in Online_Players) Equal to (==) True
                        (Player 2 (Blue) is in Players_User) Equal to (==) True
                    Then - Actions
                        Dialog - Show Voting for Player 2 (Blue)
                    Else - Actions
                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 3 (Teal) is in Online_Players) Equal to (==) True
                                ((Picked player) is in Players_User) Equal to (==) True
                            Then - Actions
                                Dialog - Show Voting for Player 3 (Teal)
                            Else - Actions
                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 4 (Purple) is in Online_Players) Equal to (==) True
                                (Player 4 (Purple) is in Players_User) Equal to (==) True
                            Then - Actions
                                Dialog - Show Voting for Player 4 (Purple)
                            Else - Actions
                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 5 (Yellow) is in Online_Players) Equal to (==) True
                                (Player 5 (Yellow) is in Players_User) Equal to (==) True
                            Then - Actions
                                Dialog - Show Voting for Player 5 (Yellow)
                            Else - Actions
                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 6 (Orange) is in Online_Players) Equal to (==) True
                                (Player 6 (Orange) is in Players_User) Equal to (==) True
                            Then - Actions
                                Dialog - Show Voting for Player 6 (Orange)
                            Else - Actions
                                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Player 7 (Green) is in Online_Players) Equal to (==) True
                                        (Player 7 (Green) is in Players_User) Equal to (==) True
                                    Then - Actions
                                        Dialog - Show Voting for Player 7 (Green)
                                    Else - Actions
                                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Player 8 (Pink) is in Online_Players) Equal to (==) True
                                        (Player 8 (Pink) is in Players_User) Equal to (==) True
                                    Then - Actions
                                        Dialog - Show Voting for Player 8 (Pink)
                                    Else - Actions
                                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Player 9 (Gray) is in Online_Players) Equal to (==) True
                                                (Player 9 (Gray) is in Players_User) Equal to (==) True
                                            Then - Actions
                                                Dialog - Show Voting for Player 9 (Gray)
                                            Else - Actions
                                         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Player 10 (Light Blue) is in Online_Players) Equal to (==) True
                                                (Player 10 (Light Blue) is in Players_User) Equal to (==) True
                                            Then - Actions
                                                Dialog - Show Voting for Player 10 (Light Blue)
                                            Else - Actions
                                                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (Player 11 (Dark Green) is in Online_Players) Equal to (==) True
                                                        (Player 11 (Dark Green) is in Players_User) Equal to (==) True
                                                    Then - Actions
                                                        Dialog - Show Voting for Player 11 (Dark Green)
                                                    Else - Actions
                                                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        (Player 12 (Brown) is in Online_Players) Equal to (==) True
                                                        (Player 12 (Brown) is in Players_User) Equal to (==) True
                                                    Then - Actions
                                                        Dialog - Show Voting for Player 12 (Brown)
                                                    Else - Actions
                                                        Do nothing
Why don't you simply do this? It's much shorter, and does the same thing.
Code:
Dialog
    Events
        Time - Elapsed game time is 4.00 seconds
    Conditions
        (Player 1 (Red) is in Online_Players) Equal to (==) True
        (Player 1 (Red) is in Players_User) Equal to (==) True
    Actions
        Set Online_Players = (All players matching (((Matching player) slot status) Equal to (==) Is playing))
        Set Players_User = (All players controlled by a User player)
        Dialog - Clear Voting
        Dialog - Change the title of Voting to Difficulty
        Dialog - Create a dialog button for Voting labelled Easy - 5 Armor Redu...
        Set Easy = (Last created dialog Button)
        Dialog - Create a dialog button for Voting labelled Normal - 0 Armor Re...
        Set Normal = (Last created dialog Button)
        Dialog - Create a dialog button for Voting labelled Hard - 5 Armor Bonu...
        Set Hard = (Last created dialog Button)
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) is in Online_Players) Equal to (==) True
                        ((Picked player) is in Players_User) Equal to (==) True
                    Then - Actions
                        Dialog - Show Voting for (Picked player)
                    Else - Actions
Just tried it. Doesn't work.
 
Hey~Ricky

Apart from what tbr found I have only one problem, it isnt important or anything, but in your "What is a voting system" Section you could explain what you can use them for, a bit more description required methinks.

I'm probably the only person who feels that way though :p

Overall though I think it is a very nice tut, +rep :thup:
Sorry, I couldn't think about what to put there.
Added a new section.
 
Nice tutorial. :D
To be honest, I'm not on WarCraft very much anymore, but I'll be sure that I implement this if I ever resume. +rep

By the way, it should be IV, not IIII. :p
 
~Ricky

I could give you some ideas to put there :)

How about......"A voting system can be used to create a fair kicking system, a way of fairly selecting modes and many more useful systems......."

Off-Topic: I can't go on warcraft rly anymore :/ Last patch that was auto-dl'd from B.net killed ma game, It keeps coming up with "Can't find Wcr.exe" or sommit like that, Iv seen ppl saying you need to dl a special patch as that one is bugged, cant find it though :( Any help?
 
You might want to add something in case the votes are equal. None of the triggers will run if any two difficulties have the same amount of votes. With the way you have it setup, it would require a fourth trigger which determines if hard or easy have the same amount of votes as normal, and then set normal as the difficulty, since it is in-between hard and easy.

You might want to consider adding average voting, if you have more than 3 levels of difficulty. If you have 12 players, and 5 difficulties:

Very Easy
Easy
Normal
Hard
Very Hard

and 6 vote for very hard, 6 vote for very easy, It will pick either very hard or very easy using the system you showed how to use. Either way, 6 players will be very unsatisfied.
 
I always wanted to see a map which has a "I don't care" option on Dialogs and Player Kicking.
It's annoying when you have to pick something/someone and you don't want to :p

Anyway, Nice tutorial, a transparent background on the trigger images would make it look smoother and nicer ^^
 
You might want to add something in case the votes are equal. None of the triggers will run if any two difficulties have the same amount of votes. With the way you have it setup, it would require a fourth trigger which determines if hard or easy have the same amount of votes as normal, and then set normal as the difficulty, since it is in-between hard and easy.

You might want to consider adding average voting, if you have more than 3 levels of difficulty. If you have 12 players, and 5 difficulties:

Very Easy
Easy
Normal
Hard
Very Hard

and 6 vote for very hard, 6 vote for very easy, It will pick either very hard or very easy using the system you showed how to use. Either way, 6 players will be very unsatisfied.
Well, I wont add the other difficulties because this is just a demo but this is easy to edit so you should be able to put more difficulties by yourself.
 
Well, I wont add the other difficulties because this is just a demo but this is easy to edit so you should be able to put more difficulties by yourself.

I said put an example of "average voting". In otherwords, if a player votes for very easy in my example, it adds 1 to an integer. Easy is 2, normal 3, hard 4, and very hard 5. Then when the voting is done, it divides the votes by the number of voting players, and then rounds the number to get the difficulty.

That way if you have a new player, playing with all pros, the game would put hard instead of very hard, if all players but the new player voted for very hard. It will make it at least challenging enough for the pros, and they can pick up the slack of the new person.
 
you can shorten this:
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Player 1 (Red) is in Online_Players) Equal to True
        (Player 1 (Red) is in Players_User) Equal to True
    Then - Actions
        Dialog - Show Voting for Player 1 (Red)
    Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 2 (Blue) is in Online_Players) Equal to True
                (Player 2 (Blue) is in Players_User) Equal to True
            Then - Actions
                Dialog - Show Voting for Player 2 (Blue)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 3 (Teal) is in Online_Players) Equal to True
                        ((Picked player) is in Players_User) Equal to True
                    Then - Actions
                        Dialog - Show Voting for Player 3 (Teal)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 4 (Purple) is in Online_Players) Equal to True
                        (Player 4 (Purple) is in Players_User) Equal to True
                    Then - Actions
                        Dialog - Show Voting for Player 4 (Purple)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 5 (Yellow) is in Online_Players) Equal to True
                        (Player 5 (Yellow) is in Players_User) Equal to True
                    Then - Actions
                        Dialog - Show Voting for Player 5 (Yellow)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 6 (Orange) is in Online_Players) Equal to True
                        (Player 6 (Orange) is in Players_User) Equal to True
                    Then - Actions
                        Dialog - Show Voting for Player 6 (Orange)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 7 (Green) is in Online_Players) Equal to True
                                (Player 7 (Green) is in Players_User) Equal to True
                            Then - Actions
                                Dialog - Show Voting for Player 7 (Green)
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 8 (Pink) is in Online_Players) Equal to True
                                (Player 8 (Pink) is in Players_User) Equal to True
                            Then - Actions
                                Dialog - Show Voting for Player 8 (Pink)
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Player 9 (Gray) is in Online_Players) Equal to True
                                        (Player 9 (Gray) is in Players_User) Equal to True
                                    Then - Actions
                                        Dialog - Show Voting for Player 9 (Gray)
                                    Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Player 10 (Light Blue) is in Online_Players) Equal to True
                                        (Player 10 (Light Blue) is in Players_User) Equal to True
                                    Then - Actions
                                        Dialog - Show Voting for Player 10 (Light Blue)
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Player 11 (Dark Green) is in Online_Players) Equal to True
                                                (Player 11 (Dark Green) is in Players_User) Equal to True
                                            Then - Actions
                                                Dialog - Show Voting for Player 11 (Dark Green)
                                            Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Player 12 (Brown) is in Online_Players) Equal to True
                                                (Player 12 (Brown) is in Players_User) Equal to True
                                            Then - Actions
                                                Dialog - Show Voting for Player 12 (Brown)
                                            Else - Actions
                                                Do nothing

to
Code:
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
                ((Picked player) is in Online_Players) Equal to True
                ((Picked player) is in Players_User) Equal to True
            Then - Actions
                Dialog - Show Voting for (Picked player)
            Else - Actions

and why are you using custom scripts to display the text?
 
Why not do this
Code:
Set Players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
instead of having two variables? :p
Then you could shorten the code given above even more, to this:
Code:
Player Group - Pick every player in Players and do (Actions)
    Loop - Actions
        Dialog - Show Voting for (Picked player)

> and why are you using custom scripts to display the text?
It's easier, since you don't have to care about leaking a force. :D
 
you can shorten this:
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        (Player 1 (Red) is in Online_Players) Equal to True
        (Player 1 (Red) is in Players_User) Equal to True
    Then - Actions
        Dialog - Show Voting for Player 1 (Red)
    Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 2 (Blue) is in Online_Players) Equal to True
                (Player 2 (Blue) is in Players_User) Equal to True
            Then - Actions
                Dialog - Show Voting for Player 2 (Blue)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 3 (Teal) is in Online_Players) Equal to True
                        ((Picked player) is in Players_User) Equal to True
                    Then - Actions
                        Dialog - Show Voting for Player 3 (Teal)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 4 (Purple) is in Online_Players) Equal to True
                        (Player 4 (Purple) is in Players_User) Equal to True
                    Then - Actions
                        Dialog - Show Voting for Player 4 (Purple)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 5 (Yellow) is in Online_Players) Equal to True
                        (Player 5 (Yellow) is in Players_User) Equal to True
                    Then - Actions
                        Dialog - Show Voting for Player 5 (Yellow)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Player 6 (Orange) is in Online_Players) Equal to True
                        (Player 6 (Orange) is in Players_User) Equal to True
                    Then - Actions
                        Dialog - Show Voting for Player 6 (Orange)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 7 (Green) is in Online_Players) Equal to True
                                (Player 7 (Green) is in Players_User) Equal to True
                            Then - Actions
                                Dialog - Show Voting for Player 7 (Green)
                            Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Player 8 (Pink) is in Online_Players) Equal to True
                                (Player 8 (Pink) is in Players_User) Equal to True
                            Then - Actions
                                Dialog - Show Voting for Player 8 (Pink)
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Player 9 (Gray) is in Online_Players) Equal to True
                                        (Player 9 (Gray) is in Players_User) Equal to True
                                    Then - Actions
                                        Dialog - Show Voting for Player 9 (Gray)
                                    Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Player 10 (Light Blue) is in Online_Players) Equal to True
                                        (Player 10 (Light Blue) is in Players_User) Equal to True
                                    Then - Actions
                                        Dialog - Show Voting for Player 10 (Light Blue)
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Player 11 (Dark Green) is in Online_Players) Equal to True
                                                (Player 11 (Dark Green) is in Players_User) Equal to True
                                            Then - Actions
                                                Dialog - Show Voting for Player 11 (Dark Green)
                                            Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Player 12 (Brown) is in Online_Players) Equal to True
                                                (Player 12 (Brown) is in Players_User) Equal to True
                                            Then - Actions
                                                Dialog - Show Voting for Player 12 (Brown)
                                            Else - Actions
                                                Do nothing

to
Code:
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
                ((Picked player) is in Online_Players) Equal to True
                ((Picked player) is in Players_User) Equal to True
            Then - Actions
                Dialog - Show Voting for (Picked player)
            Else - Actions

and why are you using custom scripts to display the text?

I already posted that shortened trigger. It's post #4 in this thread. He doesn't like it short though, claims it doesn't work even though I tested it before posting.
 
I already posted that shortened trigger. It's post #4 in this thread. He doesn't like it short though, claims it doesn't work even though I tested it before posting.
Ooh, I see now why it didn't work. Sorry, I was sleepy... :(
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top