Name | Description |
SetScript | Specify a Script to run as a coroutine. |
Declaration void SetScript( Script *script ) Parameters
script : Reference to an existing Script Asset to run in the coroutine environment provided by the LvmThread.
|
GetVariable | Retrieve an existing Script variable using its name as key. |
Declaration Variable *GetVariable( const char *name ) Parameters
name : The name of the Variable to retrieve.
Return Value
A valid Variable reference pointer; else return nil .
|
GetVariableAt | Retrieve a Variable using its index as key. |
Declaration Variable *GetVariableAt( unsigned char index ) Parameters
index : Index of the Variable to retrieve.
Return Value
A valid Variable reference pointer; else return nil if the index is invalid.
|
GetVariableIndex | Get the internal index of an existing Variable. |
Declaration int GetVariableIndex( const Variable *variable ) Parameters
Return Value
-1 if the variable reference is not associated to the current LvmThread; else return the variable index from the internal list maintained by the thread.
|
GetVariableBool | Retrieve the value of an existing boolean Variable. |
Declaration bool GetVariableBool( const char *name ) Parameters
name : The name of the boolean variable to retrieve the value from.
Return Value
false if the Variable does not exist or if its value is actually set to false ; else return true .
- Note
- This function is simply a helper function. Always verify that the Variable actually exists using the
GetVariable function.
|
SetVariableBool | Set the value of an existing boolean Variable. |
Declaration bool SetVariableBool( const char *name, const bool value ) Parameters
name : The name of the Variable to update.
value : The value to update.
Return Value
true if the variable have been successfully updated; return false if the variable does not exists or if its not a boolean.
|
GetVariableInt | Retrieve the value of an existing integer Variable. |
Declaration int GetVariableInt( const char *name ) Parameters
name : The name of the integer variable to retrieve the value from.
Return Value
0 if the Variable does not exist or if its value is actually set to 0 ; else returns the variable actual value.
- Note
- This function is simply a helper function. Always verify that the Variable actually exists using the
GetVariable function.
|
SetVariableInt | Set the value of an existing integer Variable. |
Declaration bool SetVariableInt( const char *name, const int value ) Parameters
name : The name of the Variable to update.
value : The value to update.
Return Value
true if the variable have been successfully updated; return false if the variable does not exists or if its not an integer.
|
GetVariableFloat | Retrieve the value of an existing float Variable. |
Declaration float GetVariableFloat( const char *name ) Parameters
name : The name of the float variable to retrieve the value from.
Return Value
0.0 if the Variable does not exist or if its value is actually set to 0.0 ; else returns the variable actual value.
- Note
- This function is simply a helper function. Always verify that the Variable actually exists using the
GetVariable function.
|
SetVariableFloat | Set the value of an existing float Variable. |
Declaration bool SetVariableFloat( const char *name, const float value ) Parameters
name : The name of the Variable to update.
value : The value to update.
Return Value
true if the variable have been successfully updated; return false if the variable does not exists or if its not a floating point.
|
GetVariableVec2 | Retrieve the value of an existing vec2 Variable. |
Declaration vec2 GetVariableVec2( const char *name ) Parameters
name : The name of the vec2 variable to retrieve the value from.
Return Value
A zeroed vector if the Variable does not exist or if its values are actually set to 0.0 ; else returns the variable actual value.
- Note
- This function is simply a helper function. Always verify that the Variable actually exists using the
GetVariable function.
|
SetVariableVec2 | Set the value of an existing vec2 Variable. |
Declaration bool SetVariableVec2( const char *name, const vec2 value ) Parameters
name : The name of the Variable to update.
value : The vector value to update to.
Return Value
true if the variable have been successfully updated; return false if the variable does not exists or if its not a 2d vector.
|
GetVariableVec3 | Retrieve the value of an existing vec3 Variable. |
Declaration vec3 GetVariableVec3( const char *name ) Parameters
name : The name of the vec3 variable to retrieve the value from.
Return Value
A zeroed vector if the Variable does not exist or if its values are actually set to 0.0 ; else returns the variable actual value.
- Note
- This function is simply a helper function. Always verify that the Variable actually exists using the
GetVariable function.
|
SetVariableVec3 | Set the value of an existing vec3 Variable. |
Declaration bool SetVariableVec3( const char *name, const vec3 value ) Parameters
name : The name of the Variable to update.
value : The vector value to update to.
Return Value
true if the variable have been successfully updated; return false if the variable does not exists or if its not a 3d vector.
|
GetVariableVec4 | Retrieve the value of an existing vec4 Variable. |
Declaration vec4 GetVariableVec4( const char *name ) Parameters
name : The name of the vec4 variable to retrieve the value from.
Return Value
A zeroed vector if the Variable does not exist or if its values are actually set to 0.0 ; else returns the variable actual value.
- Note
- This function is simply a helper function. Always verify that the Variable actually exists using the
GetVariable function.
|
SetVariableVec4 | Set the value of an existing vec4 Variable. |
Declaration bool SetVariableVec4( const char *name, const vec4 value ) Parameters
name : The name of the Variable to update.
value : The vector value to update to.
Return Value
true if the variable have been successfully updated; return false if the variable does not exists or if its not a 4d vector.
|
GetVariableString | Retrieve the value of an existing string Variable. |
Declaration char *GetVariableString( const char *name ) Parameters
name : The name of the char variable to retrieve the value from.
Return Value
nil if the Variable does not exist; else returns the current string value set for the Variable.
|
SetVariableString | Set the value of an existing char Variable. |
Declaration bool SetVariableString( const char *name, const char *value ) Parameters
name : The name of the Variable to update.
value : The new string value to update the Variable to.
Return Value
true if the string value of the variable have been successfully updated; else return false .
|