Skyline Lua API
Version 1.0 RC1
Lua Script Reference for Skyline Game Engine.
|
#include <LUA_API_Sensor.h>
Public Member Functions | |
void | setTargetMode_Single (int objID, int target_ID) |
Part of the sensor targeting mode commands. More... | |
void | setTargetMode_Faction (int objID, string faction) |
Part of the sensor targeting mode commands. More... | |
void | setTargetMode_Closest (int objID) |
Part of the sensor targeting mode commands. More... | |
void | setTargetMode_Random (int objID) |
Part of the sensor targeting mode commands. More... | |
void | enableVisibilityCheck (int objID, int state) |
Part of the sensor targeting mode commands. More... | |
void | isTargetVisible (int objID) |
Returns 1 or 0 if the current target is visible. Must have target enableVisibilityCheck(...) More... | |
Functions to work inconjuction with the AI Sensor Action. Note: Only objects with the same query flags as the sensors flags will be detected. Ridgid body actions use their collision group flag although only one flag at a time can be used on the ridgid body.
Use as sensor.function()
For more information on how these functions can be used please visit the User Manual - http://www.chi-ad.com/Skyline/SDN/
void sensor::enableVisibilityCheck | ( | int | objID, |
int | state | ||
) |
Part of the sensor targeting mode commands.
objID | : The ID of the parent scene entity that has this sensor. |
state | : The 1 or 0 to enable he ray visibility check to see if the AI can see its target or is it blocked? |
This command will set the sensor into random check mode. Any available object will be tracked until signal lost or destroyed.
void sensor::isTargetVisible | ( | int | objID | ) |
Returns 1 or 0 if the current target is visible. Must have target enableVisibilityCheck(...)
objID | : The ID of the parent scene entity that has this sensor. |
This command will set the sensor into random check mode. Any available object will be tracked until signal lost or destroyed.
void sensor::setTargetMode_Closest | ( | int | objID | ) |
Part of the sensor targeting mode commands.
objID | : The ID of the parent scene entity that has this sensor. |
This command will set the sensor into closest object check mode. The object closest to the sensor will be tracked. Only objects with their matching query flags set will be detected.
void sensor::setTargetMode_Faction | ( | int | objID, |
string | faction | ||
) |
Part of the sensor targeting mode commands.
objID | : The ID of the parent scene entity that has this sensor. |
faction | : The string faction of this object. This is set in the scene entities base properties "description" option. |
This command will set the sensor into Faction mode. Only objects withb their descriptions set to the same as the one passed in the artg, will be tracked. The closest will be primary target.
void sensor::setTargetMode_Random | ( | int | objID | ) |
Part of the sensor targeting mode commands.
objID | : The ID of the parent scene entity that has this sensor. |
This command will set the sensor into random check mode. Any available object will be tracked until signal lost or destroyed.
void sensor::setTargetMode_Single | ( | int | objID, |
int | target_ID | ||
) |
Part of the sensor targeting mode commands.
objID | : The ID of the parent scene entity that has this sensor. |
This command will set the sensor into single check mode. Only one object with thetarget ID will be tracked.