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??
#how to make a value show on a cv2 text
1 messages · Page 1 of 1 (latest)
string format
if youre intending to mix player name and static text
otherwise just use text set text without string format
I see the string format chip
It's just the input of the text text then run set text or just configure the chip to set the text
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
thank you
btw
To get a players display name, use To String
To get a players account name, use Get Player Account Name
I am getting the player from them pressing a button and yes I know those chips exist but thanks for the help
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 ^
👍
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!
Isnt string format in C# like this :
string playername = "mrbanana";
Console.WriteLine($"{playername} hi!");
Yes
Kinda like that
You don’t really need the $ in there you could just do
Console.WriteLine(playername + “ hi”);
This is concating string ?
in C#, you don't need a $ just writing the variable without quotes will print the value of that variable
I have never really seen someone use a $ in C# before?
Yeah but if you put $ before the quote you will be able to write the variable INSIDE the quote
And dont need the +
Concating :
stringname + "Hi"
Formatting :
$"{stringname} hi"
Oh I never knew that
That’s cool
Exactly