#how to make a value show on a cv2 text

1 messages · Page 1 of 1 (latest)

ruby thicket
#

in cv1, you can do this thing where you write {R} and it becomes a "0", you can change that 0 to be any number with the red pin on the top of the cv1 text, I want to be able to do this with cv2 but with a players name put in that spot, how would I do this??

#

I can already get the players name btw

molten forge
#

string format

#

if youre intending to mix player name and static text

#

otherwise just use text set text without string format

ruby thicket
#

I see the string format chip

unkempt wedge
#

It's just the input of the text text then run set text or just configure the chip to set the text

thorny bay
# ruby thicket I see the string format chip

with String Format, instead of doing something like {r}, {g} and {b}, you are using values {0} through {63}, meaning you have 64 different inputs

{0} gets replaced with whatever string is in the first "Value" input on the String Format
{1} gets replaced with whatever string is in the second "Value" input on the String Format

Configure the String Format to add or remove inputs

thorny bay
# ruby thicket thank you

btw

To get a players display name, use To String
To get a players account name, use Get Player Account Name

ruby thicket
thorny bay
#

And, a really important Cv2 thing that might be hard for new Cv1 users to understand

Local player = You, so Get Local Player will always return you

"Local" just means you
Everyone is themselves but no one else
You are yourself but not me
I am myself but not me

Everyone has their own copy of circuits and runs them individually, so something I see on my screen might not be the same on your screen

#

@ruby thicket ^

ruby thicket
#

👍

#

I'm not a new cv2 user I have used C# for a long time and that's unitys coding language and cv2 is very similar to C#

#

once again thank you!

sand tundra
ruby thicket
#

You don’t really need the $ in there you could just do
Console.WriteLine(playername + “ hi”);

ruby thicket
#

I have never really seen someone use a $ in C# before?

sand tundra
#

And dont need the +

#

Concating :
stringname + "Hi"
Formatting :
$"{stringname} hi"

ruby thicket
#

That’s cool

sand tundra