I want to make a percentage randomizer

I’ve used a tutorial to create a team randomizer but it sometimes isn’t random, meaning that the randomizer keeps choosing one player. I want it to have a certain percentage shown- For example, if someone was chosen as an imposter it lowers their percentage to under 10% and raises it for all other players. how could I do that?

1 Like

Unless you don’t have to end the game to actually play another round, you can’t.

A theory could be:

x% = x/100 in percentage. This may help.

1 Like

That won’t work unless like I said above:

Unless you don’t have to end the game to actually play another round, you can’t.

1 Like

i want to make it so that I don’t have to end the game to do another round. i made an among us map and I really want that stuff for it

You would need to (once the game is won by someone) send players back to the start and set the team to crewmate. Afterwards: you get an overlay to restart the match, as host. Create a property, number type, for player scope. Keep it at 10 for default value. Then, increment after each round, if the player was a crewmate, and decrement if the player was imposter. Use the following blocks to randomize it.

set chance to: random(1, 100)
set prob to: get property: "prob"
if: <chance < prob>
Do: Broadcast Message On Channel: "is imposter"
else: 
do: Broadcast Message On Channel: "is crewmate"
2 Likes

how do I make it so that when at least one player is left alive it shows a notification saying the imposter won and a different one for when the imposter is either voted out or the tasks are completed?

1 Like

Do you have a system for ending the game yet?

2 Likes

no

1 Like

I’m assuming you have a system for counting tasks, so have a counter have a target value. Connect the counter to a notification device. Would you like to know how this works?

2 Likes

yes please, navycatZ

1 Like

Add a zone to be wired to a wire repeater. The wire repeater will then only allow pulses from the team number of the crewmates. Afterwards, you will update a counter counting how many entered the game, then decrement the counter everytime a player is KO’d by the imposter. You can have a target value for the counter, then wire to a notification that will say what you want once the imposter has won. You would check in the block code if the player was an imposter, if so, send a message on a channel and boom. If you have a property for the tasks comepleted good, if not then add one. You will add a block of code to check if all the tasks are completed, if so: broadcast on channel, and done!

1 Like

Every time someone does a task the counter increments. The target value setting sets it so the counter will send a signal when it reaches a certain value. In this case it’s the total amount of tasks in your map. Once all tasks are completed, the counter will send a signal to a notification device.

2 Likes

how do I make an overlay only available to the host?

1 Like

Use a lifecycle. The lifecycle only affects the host.

it does?

1 Like

i tried it, It shows to all players

1 Like

Let me see the set up.

1 Like

Screenshot 2023-10-24 1.09.41 PM

1 Like

Do you have the overlay as: active on game start?

1 Like