Krig Game Engine Lua Scripting API - Game Object.
More...
|
const luaL_reg | krigObjectLib [] |
|
Krig Game Engine Lua Scripting API - Game Object.
Game object API functionality.
◆ add_particle_system()
void add_particle_system |
( |
GameObjectReference |
, |
|
|
int |
|
|
) |
| |
Add a particle system to the game object.
- Parameters
-
int | - number representing the particle system to load. |
- Returns
- n/a
◆ load()
Load properties for game object.
- Returns
- GameObject
◆ orient_on_terrain()
void orient_on_terrain |
( |
float |
, |
|
|
float |
, |
|
|
float |
|
|
) |
| |
Rotate the game object such that it appears to be resting on the terrain. Additionally, the specified rotation will be used as the base rotation of the game object.
- Parameters
-
x | rotation around x axis |
y | rotation around y axis |
z | rotation around z axis |
- Returns
- n/a
◆ save()
Save game object properties.
- Returns
- n/a
◆ set_height_from_terrain()
void set_height_from_terrain |
( |
GameObjectReference |
, |
|
|
float |
|
|
) |
| |
Determine the height of the terrain beneath the game object and set its height to match the terrain's height at this location. The offset is used to adjust the object's height along the y axis.
- Parameters
-
- Returns
- n/a
◆ set_interpolation_value()
void set_interpolation_value |
( |
float |
| ) |
|
Set current value of the interpolation variable.
- Parameters
-
- Returns
- n/a
◆ set_model()
void set_model |
( |
string |
| ) |
|
Specify the model to render for the game object. file containing the model to load.
- Returns
- n/a
◆ set_script()
void set_script |
( |
string |
| ) |
|
Set lua script for game object.
- Parameters
-
string | lua script file name. |
- Returns
- n/a
◆ set_texture()
void set_texture |
( |
string |
| ) |
|
Specify the texture to render for the sprite. file containing the texture to load (in png format).
- Returns
- n/a
◆ setup_interpolation()
void setup_interpolation |
( |
Vector4 |
, |
|
|
float |
, |
|
|
Vector4 |
, |
|
|
float |
|
|
) |
| |
Set the end rotation (by axis) for the specified game object's interpolation.
- Parameters
-
Vector4 | - start rotation. |
float | - start interpolation value. |
Vector4 | - end rotation. |
float | - end interpolation value. |
- Returns
- n/a
◆ suspend()
Suspend running the game object's script until the suspend time has elapsed.
- Parameters
-
- Returns
- n/a
◆ krigObjectLib
const luaL_reg krigObjectLib[] |
Initial value:= {
{"update_interpolation_value", update_interpolation_value},
{NULL, NULL}
}
void add_particle_system(GameObjectReference, int)
void setup_interpolation(Vector4, float, Vector4, float)
void orient_on_terrain(float, float, float)
void set_height_from_terrain(GameObjectReference, float)