String of number to number?

Is there a way to have the string of a number usable as an input value?

I found a very unclean workaround where you create an array of strings of their element indexes… You can now find the array value index of a string. This still can’t convert decimal numbers and is also limited to the amount of strings in said array…

Thanks for any help!

Edit: I’ve created a simple tool able to convert any number string to a number value (including decimals). Game code: K8P1S - Feel free to use the script in your modes!

No, there is no way for arbitrary use cases to convert raw numerical string values to either decimal or integer raw values, like “35,788” to 35,788, available. You need to restrict your vision and concept of the game mode you want to create with such limitation and work with the method you discovered and see fit, but that as you noticed can become unnecessary complex cause at one point you either need alot of Arrays or and handful of multidimensional Arrays, which are clunky to use with the GUI in the in-game editor at this point i would also recommend using transpilers like OverPy or OSTW(Overwatch Scripts to Workshop), but they also don’t fix everything they just make the work with such unarbitrary cases a bit easier for you.

1 Like