Results 1 to 8 of 8

Thread: Is it possible to detect chat words/commands? (Voting system)

  1. #1

    Question Is it possible to detect chat words/commands? (Voting system)

    So, I have an object that I want to change color. However I want the color to change depending on what is said in chat. For example saying "!red" would change the object color to red. I'm wondering if there is something like getChatPrint() or something like that.
    Last edited by Troubled Salmon; 11-07-2016 at 10:07 PM.

  2. #2
    not yet, to my knowledge. it has been suggested previously

  3. #3
    Hmm... that's a bummer. Since it doesn't exist I've been thinking of other solutions. What I came up with is using the notebook. For example with getNotebookTabs(), would it be possible to paste a string into the script?

  4. #4
    Join Date
    May 2016
    Warning: Notebook is generally glitchy, where changes sometimes do or do not show up correctly there for host/clients, sometimes tabs vanish or duplicate. Its a whole mess.

  5. #5
    Ok so I guess a voting system is out of the question for now. Except for buttons and stuff.

  6. #6
    Join Date
    May 2016
    You COULD have a board with room for buttons, or multiple boards 1 for each button that you spawn with spawnObject().

    Once you have your spawned object, you use createButton to make a button for each seated player. If a person clicks it, have each click function try to add the color of the person who clicked it to a table along with who they voted for. If it finds that person already voted, it doesn't accept additional/changed votes to the table. After X time or once it receives all the votes, then it tallies them up and does whatever you wanted wit hthat system.

    A voter is actually fairly CONCEPTUALLY simple. I could help with the execution if you wanted. But the trouble is what do you want it to vote FOR? Like for players, or for certain events to happen. Is it a yes/no only or multiple choice? What happens in ties? etc etc. If you can mentally figure all that out, I'd be happy to help you if its something you'd need

  7. #7
    I'm not gonna lie, but the voting system was purely a concept. I only started creating lua scripts 2-3 days ago(learning from your guides Stump), from which I knew nothing. I was going to try and make a voting system just for practice, with the potential for it to be expanded on.

    There could be multiple uses for a voting system, for example in the blackjack games you could have a vote for which minigame the players might want to play. If you have a table with multiple games on it (UNO, exploding kittens, munchkins) then there could be a vote for which minigame. Obviously a voting system in those is not necessary but could be nice to have.

    Another use for it would be for a trivia like game, where a question is asked and the player/s votes for the answer (multiple choice).

    As for ties well I guess that would be dependent on the situation. In a situation where there is a tie for which game to play, there could a random choice made, where the script would randomly choose one of the two.

    Edit: Actually a voting system could be made with counters, where each number represents a different game/choice.

  8. #8
    Join Date
    May 2016
    The easiest way to do this would be to have a big board/token/whatever appear with the names of your minigames on it. Then each player can click a button once to cast their vote. Once it detects as many votes as you have seated players (or if you click a button to end the voting) it disappears and announces the winner. If you are interested in proceeding, we can do this in steps. Then I can help with each step

    Step 1) Give yourself a dealer only button that can press to "call for a vote". When you press it have it use spawnObject() to spawn a large-scaled token (or whatever you want to put your buttons on on) and lock it over top of the play area with a callback function. You can spawn an object from in game, or a custom object (like a custom token, which is what I would probably pick) to put those buttons on.

    If you are interested in proceeding, get that much done or come back for help with it if its not working. From there, we'll move on to creating the buttons from voting choices. If we are going to proceed, decide if you want to always offer the same number of games (say, 4 minigames) from a pool of more possible games (say 8 minigames) or are you only ever going to just have X many minigames to choose from, no more? How many did you want displayed?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts