#help (URGENT)
1 messages · Page 1 of 1 (latest)
Is your system assigning colours to players?
yes
As in making their name have a colour?
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
Have a list a colors, then use the player's room ID to chose a color from the list
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
Modulo?
K3 is typing a 5 paragraph essay
im tired of having to add a variable at the start of the list create to tell the game what variable i want
Use list get element or a Value Integer Switch
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
how do i work modulo again
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
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.
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.
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
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
what do i do with it
Use it
that outputs a message in the console
Oh
You can use the “List Create” and “List Concat” chips for lists, or the “String Concat” and “String Split” for strings.
K3 has the solution don't worry
I think he means how can he get more inputs
how do i use this
"Print text to screen"
ohh ok
It turns multiple strings into 1 string, separated by whatever text/symbols you put in that "separator" input.
No, you're now the problem, we must fix you 
Could you elaborate on this please?
He meant he needs to be able to input 2 different strings
Cause you can't wire two string outputs into one input
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
ok im a bit confused, i wish i had someone who could help me by like joining, is anyone free?
Ye
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
If you are sending the event to all, you shouldn’t need to send the event to the local player again.
I dunno either, but that's what he's trying to do and there may be a specific reason for it
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
@spare yoke @void sable @balmy light @fiery urchin
When the local player joins, pick a random float between 0 and 1
Use this value in Hue input of HSV to Color, this is your color
Feel free to pick 2 more random floats for Saturation and Value
And then because I dont want to risk a mention spam mute, at last we have @karmic depot
I already helped him
All I saw was someone wanting a completely random color on join, and thats what I answered
Fair
While the random number works, it can also be an issue if two players get the same color
They didnt ask for unique colors in the original post