I'm a little confused on how to work this, so if someone could explain it to me, it would be really helpful. I figured out how to get "-setname" working as a substring, but I can't figure out how to do anything with following String, can anyone help me with this?
Actually you didn't explain very well, but I guess your trying to make a setname system like in DoBRP.
Requirements (you must have this first):
-Two variables of type String. Name it OneName1 and Name02 (for example). Enable Array and set it to 8.
This should do it:
Events:
Player - Player 1(Red) types a chat message containing setname as A substring Player - Player 2(Blue) types a chat message containing setname as A substring Player - Player 3(Teal) types a chat message containing setname as A substring (Do this for all players)
Set Variable: Set Name02[(Player number of (Triggering player))] = ((OneName1[(Player number of (Triggering player))] + (Substring((Entered chat string), 9, 119))) + |r)
I hope you can find all the stuff when making Actions. Good Luck.
greenbaronI want to do things like "-setname 01 (player number) MYNAMEHERE" and have it change the player name to "MYNAMEHERE." That a good enough explanation?
I don't know how to explain that very well but I guess this explenation does it: the 1-8 detects the number of letters you write.
s-e-t-n-a-m-e-> 1-2-3-4-5-6-7-8
subtring 1 - 8
This means that only the setname isn't stored.
The ones at the end,
9,119
The number 9, is to prevent the trigger to store the setname>, otherwise when you typed for example -hi, the name (for example) John: Hi wouldn't appear. It would show up like this setname>John: Hi. For the number 119, I belive that it's the limit of letters you can write when playing in-game.
Substrings are easy to understand if you master them.
Your welcome, I figured out how to make most things of DoBRP myself. In fact, I kind of guessed what that Substrings meant by myself, but just thinking like this. If the 8 first letters is setname>, then a subtring might work on this . It's a long story =P
The number 9, is to prevent the trigger to store the setname>, otherwise when you typed for example -hi, the name (for example) John: Hi wouldn't appear. It would show up like this setname>John: Hi. For the number 119, I belive that it's the limit of letters you can write when playing in-game.
correct, but instead of 119 you can use string length of (entered chat string). so you get the exact word without " " space.