Script v1.4.4.0
Engine v7.0.0.2
- General
- Entity
- Node
- Scenegraph
- Lighting
- Camera
- Shape
- Particle System
- Physics
- Spline
- Animation
- Overlays
- Sound
- Input
- XML
- Network
- Callbacks
- Text Rendering
- Terrain Detail
- Tire Track
- Editor
- Rendering
- String
- Math
- I3D
- Fillplanes
Foundation Reference
Utils
DescriptionUtilsFunctions
indexToObject
DescriptionReturns index of objectDefinition
indexToObject(table components, string index)Arguments
table | components | components (also (integer) id of root node possible) |
string | index | index |
integer | id | id of object |
integer | id | id of used root node |
vector2Length
DescriptionReturns length of vectorDefinition
vector2Length(float x, float y)Arguments
float | x | x |
float | y | y |
float | length | length |
vector3Length
DescriptionReturns length of vectorDefinition
vector3Length(float x, float y, float z)Arguments
float | x | x |
float | y | y |
float | z | z |
float | length | length |
lerp
DescriptionReturns interpolated value between two given valuesDefinition
lerp(float value1, float value2, float alpha)Arguments
float | value1 | start value |
float | value2 | end value |
float | alpha | alpha |
float | value | interpolated value |
clamp
DescriptionReturns value between given min and maxDefinition
clamp(float value, float minVal, float maxVal)Arguments
float | value | to clamp |
float | minVal | min value |
float | maxVal | max value |
float | value | value |
getNoNil
DescriptionReturns second parameter if the first is nilDefinition
getNoNil(any_type value, any_type setTo)Arguments
any_type | value | value |
any_type | setTo | set to value |
any_type | value | not nil value |
getVectorFromString
DescriptionReturns vector from string separated by a whitespaceDefinition
getVectorFromString(string input)Arguments
string | input | input |
any_type | unpackedValues | returns unpacked values found in string |
getVectorNFromString
DescriptionReturns vector N from string separated by a whitespaceDefinition
getVectorNFromString(string input, integer num)Arguments
string | input | input |
integer | num | number of values |
table | values | values |