Hey, Im developing an inventory and weapon equipment system in my game. It uses strings. To make it simpler, i use only one string seperated by commas. e.g,
1,2,Weapon Name,2,50,
where each part of the string represents something. Now, the problem here is that i cant use the string manipulator to assign different parts of the string in one event. for example, if i want to assign the third part, which is "weapon name" to some variable, i can do that. But if i want to assign "weapon name" and the part after that, i cant. ive even tried doing that with 6 different string manipulators and it still wont work.
Does anyone have any idea how it would? Also, Ive tried using string parser but I dont really know how to get CSVs from it. Any help will be most appreciated.
It's quite simple really. First, you have to add "," as a delimeter, like so:
* Start of level
- String Parser: Add delimeter ","
Then, you set the source string:
* (Event)
- String Parser: Set source string to "1,2,Weapon Name,2,50,"
You probably want to use an expression there, but you get the idea. Then, you use the listGetAt$ function to get the appropriate value from the string. It's found under String Parser > List Tokenizing > Get element. So to get the weapon name (element #3) from the above string, you'd use something like: