[HELP] Any way to choose random player in PB2?

Report any bugs here or ask questions here!

[HELP] Any way to choose random player in PB2?

Postby Zibuya » 21 October 2020, 20:35

Sup Guys, quick Question about ALE trigger functions:

Is it possible to create a var that randomly chooses a player in game purposes for example? A mechanic like this is (maybe) already implemented in and would also come in handy for different ''among us'' recreations in pb2 for example.

I would be interested about either several answers or by one. Thanks

Zibuya
Cyber Grub [25]
 
Posts: 44
Joined: 31 October 2019, 17:12

Re: [HELP] Any way to choose random player in PB2?

Postby nightmar » 22 October 2020, 11:32

It is very possible if you use some specific variables. But you will have a lot of sync problems (like no player been chosen).
How many bugs does this game have anyway? jeez
User avatar
nightmar
Usurpation Destroyer [350]
 
Posts: 393
Joined: 2 September 2017, 19:36
Location: Inside your closet or under your bed

Re: [HELP] Any way to choose random player in PB2?

Postby Nyove » 22 October 2020, 14:50

Hey Zibuya,

To answer your question - yes it is possible.
Take a look at this map: https://www.plazmaburst2.com/?s=9&a=&m= ... &id=980574
It's not random player but it's a form of synchronized random number generator, something a random player generator will utilise.

However, as what nightmar has mentioned, the main issue is with syncing of variables.
Random VAR trigger action is client sided and is different for every player.

The general concept is
1. Ensure only one player executes the random trigger action. (region attached to moving door scanning the spawn area, deactivated after one use.)
2. Run sync trigger action to ensure that everyone obtains the same random variable.
3. Perform your corresponding tasks in regards to the random variable.
The example given above doesn't use this method, it uses URL trigger action to generate random numbers because the random number trigger action is flawed.

I won't give you a detail explanation, because if you want to make mechanisms like these I expect you to have a great understand of variables as well as syncing in the first place.

Best regards,
Nyove
Proud to be part of something meaningful.
Need any assistance? Join the PB2 discord server at https://discord.com/invite/Bhe9rNz or raise a support ticket at https://www.plazmaburst2.com/support

Contact me on discord for quickest reply possible.

User avatar
Nyove
Falkok [250]
 
Posts: 255
Joined: 7 July 2016, 10:26
Location: Cicada 3301


Return to Bug Reporting, Help & Support

Who is online

Users browsing this forum: No registered users