StrToFloat (script event)
Game class
This event operates on an instance of the game class type {{{gameclass}}}
Description
Converts the string to a float value
Usage
sys.strToFloat(string text)
Parameters
- text = the string to be converted to a float value
Examples
string test1="33.333";
sys.println ( sys.strToFloat(test1));
This would output “33.333” to the console. This allows key value’s in entities to be used in scripts as float (normally they are all strings).
Notes
If the string contains non-numerals the result will always be zero.