1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Among Us Random Player

Discussion in 'Skript' started by Papaeske, Dec 17, 2020.

Thread Status:
Not open for further replies.
  1. Papaeske

    Papaeske New Member

    Joined:
    Oct 25, 2020
    Messages:
    7
    Likes Received:
    0
    Hey, i just wanted to ask if anyone had an idea on how to make a program that: Picks a random player from a specific list and then give them some kind of permission or like {impostor.(picked player).true} etc.
     
  2. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    You can get random element out of array like so:
    Code (Text):
    1. set {_player} to random element out of {game.players::*}
    And for permissions, you could have another array with all impostors. After choosing one randomly, you could push it into array and later to add permissions to them, you could just check if that player is in impostors array.
     
  3. Papaeske

    Papaeske New Member

    Joined:
    Oct 25, 2020
    Messages:
    7
    Likes Received:
    0
    Thx :emoji_slight_smile: :emoji_thumbsup:, but what method could then be used to check if the player is the "impostor" / selected?
     
  4. Harrison Hall

    Harrison Hall Active Member

    Joined:
    Nov 2, 2019
    Messages:
    57
    Likes Received:
    0
    set {_player} to random player out of all players
     
  5. MusicManSK

    MusicManSK Active Member

    Joined:
    Nov 30, 2017
    Messages:
    232
    Likes Received:
    11
    He asked for:
    not for:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...