Have players enter their name into the game before the game starts, and then use that as their name in the game instead of their Bnet one. Then store that into the bank as a string.
Then when someone talks, have their "game name" in parenthesis next to the chat area, just in case they decide to change their name to something different than their Bnet name.
if you want, you could even have a system that will check and make sure that no one else has that name currently. Because there are no global high scores, it doesn't matter if someone changes their name per game, as long as that data can be taken from the bank and then changed if it needs to be.
You can't convert text to a string, no matter if you use raw code or not.
What is commonly misunderstood is that the raw code is no different than the preset options in the editor. Writing your own code is for your own convenience only. There are a couple of things that are made easier with code, and some things that aren't even possible without it. However, none of these things include items that Blizzard does not support, and converting text to a string is one of them. The difference between a text value and a string value may seem very similar, but they are quite different in nature. Also, someone mentioned banning this for the purposes of that Blizzard doesn't want blacklists, which is also very possible.
I strongly recommend doing what I have suggested, as it works well and also gives the user much more flexibility and customization.
Also, note that I program in Java, not Galaxy Script, so some of the information posted above may not be entirely true. However, I do know that no matter what language you are programming in, converting text into a string is much more difficult than it seems.
(In case you were wondering or didn't know, universally a text value is considered a value with color, indents, size of text, UI formatting and other data, whereas a string value is a, well, string of characters that each have a "value" to them. For example, you can't return a particular character in a text value, but you can in a string value)
Thanks for the informed response. I figured as much, but I wanted to confirm it without any voodoo half-truths. I can trigger my way out of just about any situation but I know very little about scripting. Go figure :P
I've seen what you're suggesting work. For example, the Mafia map currently uses something similar. It runs into problems, like if a player deletes his bank. Anything that players can manipulate freely they can also abuse, and often will. The biggest problem with the whole text to string is really that we have almost no control over the default chat system - though creative map makers can (and have) find other ways of dealing with it.
Anyway, I digress. Carry on.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
why can´t you convert text to string but not string to text??? and why can´t i save a players name as a string?
how can i store the name of a player in a bank?
because it is.
my guess would be, that blizz is trying to prevent blacklists/autokick
@b0ne123: Go
blizzard ist doof...
@PsychoMC:
Have players enter their name into the game before the game starts, and then use that as their name in the game instead of their Bnet one. Then store that into the bank as a string.
Then when someone talks, have their "game name" in parenthesis next to the chat area, just in case they decide to change their name to something different than their Bnet name.
if you want, you could even have a system that will check and make sure that no one else has that name currently. Because there are no global high scores, it doesn't matter if someone changes their name per game, as long as that data can be taken from the bank and then changed if it needs to be.
Great to be back and part of the community again!
Are there any programmers out there that know how to convert text to string using custom script? Would this work in the editor?
@BasharTeg:
You can't convert text to a string, no matter if you use raw code or not.
What is commonly misunderstood is that the raw code is no different than the preset options in the editor. Writing your own code is for your own convenience only. There are a couple of things that are made easier with code, and some things that aren't even possible without it. However, none of these things include items that Blizzard does not support, and converting text to a string is one of them. The difference between a text value and a string value may seem very similar, but they are quite different in nature. Also, someone mentioned banning this for the purposes of that Blizzard doesn't want blacklists, which is also very possible.
I strongly recommend doing what I have suggested, as it works well and also gives the user much more flexibility and customization.
Also, note that I program in Java, not Galaxy Script, so some of the information posted above may not be entirely true. However, I do know that no matter what language you are programming in, converting text into a string is much more difficult than it seems.
(In case you were wondering or didn't know, universally a text value is considered a value with color, indents, size of text, UI formatting and other data, whereas a string value is a, well, string of characters that each have a "value" to them. For example, you can't return a particular character in a text value, but you can in a string value)
Great to be back and part of the community again!
@TacoManStan: Go
Thanks for the informed response. I figured as much, but I wanted to confirm it without any voodoo half-truths. I can trigger my way out of just about any situation but I know very little about scripting. Go figure :P
I've seen what you're suggesting work. For example, the Mafia map currently uses something similar. It runs into problems, like if a player deletes his bank. Anything that players can manipulate freely they can also abuse, and often will. The biggest problem with the whole text to string is really that we have almost no control over the default chat system - though creative map makers can (and have) find other ways of dealing with it.
Anyway, I digress. Carry on.