#Consumable Queue/Wait

1 messages · Page 1 of 1 (latest)

smoky fern
#

Is their a way to make a consumable queue so that multiple people dont go up at one time, the point is to defuse a bomb and its 1 person from the game goes up, but a consumable lets you go up next, but if someones bought it at the same time, it goes into a queue?

umbral lodge
#

Use a player list, and every time a player uses the consumable, it adds the player to the list. Naturally it puts them at the bottom, which we can use. When it sends someone up, it gets the player at the top of the list, sends them flying, and removes them from the queue.

umbral lodge
#

No prob

opaque crane
#

@umbral lodge @smoky fern remember that lists are not synced, and you will need to manually sync them

opaque crane
# smoky fern wym?

Lists are not synced, meaning if I add a player to my list, you wont see any changes

#

i will need to send you (or Everyone/All) my list whenever I change it

smoky fern
#

i dont get it

umbral lodge
opaque crane
umbral lodge
#

Player Leaving: if is room auth: event send to all players: save data: delay 2 secs: start at new room auth 🤯

opaque crane
#

You are, however, somewhat right

Personally, I think you should send list syncing events to the room authority, something like "UpdateList", or "ListAddItem"
The room authority adds these to their own list, and then sends their list to everyone

Doing this carefully to avoid overheating networking will give you a synced list that never desyncs, but will run into an issue if the room authority stops responding to requests (because for example, they turned their headsets off)

opaque crane
# umbral lodge Player Leaving: if is room auth: event send to all players: save data: delay 2 s...

Player leaving doesnt have to fire

Player leaving only fires when the player leaves through natural methods, aka joining a new room
This event will not and cannot fire if the player leaves by for example, crashing, or closing their client

This is because "Player Leaving" is essentially sent to everyone when the local player says "Hey, I'm leaving the game now"
The local player's client wont know when they are going to crash/turn off their headset

umbral lodge
#

True

#

We could also use delimiters and variables to create lists that sync, and decode when used

opaque crane
umbral lodge
#

Stuff like (Cryptic,Zer0,JJ). Would be a string variable would be decoded into ((Cryptic)(Zer0)(JJ))

opaque crane
umbral lodge
#

This turned from a help discussion to a synced list tutorial

smoky fern
#

wish i knew wtf yall r talking about