Setting a variable to a string

So the last patch allows us to now set a variable to a string
Example: Set Var A - Custom String - Killroy (my user name for exampe)

And you were always able to set a variable to a player’s name
Example: Set Var B - Event player
and Var B would show up as Killroy (My user name)

Now for example, i CAN set Var A and Var B to a custom string, and then have a condition that IF Var A = Var B, execute action. And it works… BUT, it doesn’t seem to work if i compare a custom string to a player’s name… SO, any idea if this is possible? Am i doing something wrong?

Say for example, i wanted to set a condition for a specific player who joins my game (let’s say they are a regular who join often) and he/she get’s some special ability. Simply cuz their name satisfies the condition.

When you set the username in variable you add not a name actually, u’re add a PLAYER. So you trying to compare the string and the player in slot. Of course system will say you that it isn’t same thing, cause it really is.

1 Like

Bummer…cuz in the Workshop Inspector, it shows up as the name of the player (as in the form of text of the player’s name) owell…

What do you mean? (20 char req.)

You need to convert Var B to a string as well by using Custom String("{0}", Event Player)

1 Like

Finally got around to testing this. I couldn’t get the Event Player to work inside a custom string as you have shown. BUT, per my example above, i Did get a condition to work for IF A = B.

Set Var A, Custom String; (Killroy) “must include parentheses around your name”

Set Var B, String, “(0)”, Event Player. Because the parentheses show up in the string in the Var B block, they must be included in the Custom String as well…

So now, whenever a specific person join my games, i can give him/her a special whatever simply cuz their name satisfies the condition.

1 Like

Maybe read the answers in the thread, because SpaceJester gave you this exact solution …

…Maybe read what I replied back…Said CUSTOM string wouldn’t work… So no…wasn’t ‘exact’. Honestly, is there a point to commenting on a thread you weren’t even part of, just to be condescending?

1 Like

Sry I probably missunderstood your post.