#help (URGENT)

1 messages · Page 1 of 1 (latest)

void sable
#

how would i make a system that gets a random color when a player joins, keeps that color as long as the player is in there, then de assigns that color when the player leaves?

balmy light
void sable
#

yes

karmic depot
#

As in making their name have a colour?

void sable
#

no like, i just need it to keep a color value based on the player

#

like

#

im trying to make a chat system

#

where when someone chats onto the text screen

#

their message is colored randomly

#

then they keep that color

#

for their messages

fiery urchin
#

Have a list a colors, then use the player's room ID to chose a color from the list

void sable
#

what is a room id

fiery urchin
#

The second one

#

It's a unique number assigned to every player in the room.

#

You could also use a bit of math and a HSV to Color instead of using a list

void sable
#

whats that one called uh

#

what is that one where it gest the quotient

fiery urchin
#

Modulo?

void sable
#

or something

#

yeah that one

#

thanks

fiery urchin
#

K3 is typing a 5 paragraph essay

void sable
#

im tired of having to add a variable at the start of the list create to tell the game what variable i want

fiery urchin
#

Use list get element or a Value Integer Switch

spare yoke
#

You could go random float (with its inputs set to 0 and 1) and plug that into the "hue" input of a HSV to color chip.

#

Though that won't allow for any brown colours, or anything from black to white

void sable
#

how do i work modulo again

fiery urchin
#

You could also divide 1 by the max number of players minus 1, then multiply that number by the players Room index.

#

That would be an automatic solution that divides every player's color equally

balmy light
# void sable how would i make a system that gets a random color when a player joins, keeps th...

Spawn in a “List<Color>” variable. When a player joins (you can detect when a player joins using the “Event Receiver” and configuring it to “Player Joined”), check if the local player is Room Authority using the “Local Player Get Is Room Authority” chip. Use a “Random From List” chip to assign a colour to the player that joined, and remove that colour from the list. You can also add a tag to the player representing what colour they have. When a player leaves (Event Receiver: Player Leaving), add the colour they had to the list using the “List Add” chip.

The above solutions also work and are likely simpler and easier. Note that using the player’s room index does not make their colour random.

spare yoke
# void sable how do i work modulo again

Modulo is the remainder of a division. So 2 modulo 1 would be 0, because a bunch of 1s fit neatly into the number 2. But 1 modulo 1.59 for example, would equal 0.59 because the 1 fits, but the extra does not.

fiery urchin
#

You could also do a simple check if the player Room index is even or odd to have the colors switch between brightness to be able contrast them better

void sable
#

thank you now i can uh sync my screens

#

ok wait how do i get multiple string values into one string

#

im trying to have multiple inputs for the message from the event and the local message

fiery urchin
#

Log string

#

I think that's the name

void sable
#

what do i do with it

fiery urchin
#

Use it

void sable
#

that outputs a message in the console

fiery urchin
#

Oh

balmy light
fiery urchin
#

K3 has the solution don't worry

spare yoke
#

I think he means how can he get more inputs

void sable
#

how do i use this

spare yoke
#

"Print text to screen"

void sable
#

ohh ok

spare yoke
fiery urchin
#

No, you're now the problem, we must fix you RRsmileF

spare yoke
fiery urchin
#

He meant he needs to be able to input 2 different strings

#

Cause you can't wire two string outputs into one input

spare yoke
#

If you mean that you want multiple inputs so one is for the information sent to all and one is just done locally, you can just also send your local information through an event sender, just configure the event sender to "local"

#

Or alternatively use the "print text to screen" chip

void sable
#

ok im a bit confused, i wish i had someone who could help me by like joining, is anyone free?

void sable
#

my username is the same as my name here

spare yoke
#

When you use an event sender you can configure it to tell it who to send the event to. It should be set to all, but also if you spawn another one you can use it to send the same event, but just set to locally

balmy light
void sable
#

is my ign

spare yoke
#

If i had to guess, it's to show only the local player extra text like a settings menu, or local information like a level up message or a "consumable purchased" message or something

unique cape
#

And then because I dont want to risk a mention spam mute, at last we have @karmic depot

fiery urchin
#

I already helped him

unique cape
fiery urchin
#

Fair

#

While the random number works, it can also be an issue if two players get the same color

unique cape