All variables to control a pawn. More...
Read-Only Variables | |
int | ExecutionLevel |
This is a read-only variable which indicates the execution level of the script. 0 is low level, 1 is high level. | |
float | time |
A read-only variable that contains the amount of time, in seconds, that has elapsed since low level scripting for this pawn started. Used to keep track of the current time. | |
int | DifficultyLevel |
This is a read-only variable which contains the difficulty level of the level. Easy is 1, Medium is 2 and Hard is 3. | |
string | EntityName |
This is a read-only variable which contains the szEntityName of the Pawn entity. It can be used to generate unique trigger names from a script that is being used by multiple pawns. | |
int | health |
A read-only variable that contains the current amount of the attribute assigned to the pawn by the high level method AttributeOrder. This is the health of the pawn. | |
bool | in_pain |
A read-only variable that is true if the attribute of the pawn has decreased since the last frame. Used to indicate if damage has been done. | |
float | current_yaw |
A read-only variable that contains the current yaw angle, in radians, of the pawn. | |
float | current_pitch |
A read-only variable that contains the current pitch angle, in radians, of the pawn. | |
bool | animate_at_end |
A read-only variable that is true if the current animation has reached its end. Used to tell if an animation is finished so the pawn can be animated again. | |
bool | IsFalling |
A read-only variable that is true if the pawn is currently falling. | |
float | current_X |
Returns the current X coordinate of the pawn. | |
float | current_Y |
Returns the current Y coordinate of the pawn. | |
float | current_Z |
Returns the current Z coordinate of the pawn. | |
float | distancetopoint |
Returns the distance in texels to the current ScriptPoint. | |
float | player_X |
Returns the current X coordinate of the player. | |
float | player_Y |
Returns the current Y coordinate of the player. | |
float | player_Z |
Returns the current Z coordinate of the player. | |
float | player_range |
A read-only variable that contains the current distance the pawn is from the player. | |
float | playertopoint |
Returns the distance of the player to the current ScriptPoint. | |
bool | player_vis |
Returns true if the player is visible or false if not visible. | |
float | player_yaw |
Returns the current player yaw. | |
int | player_weapon |
Returns the slot number of the current player weapon. | |
string | player_animation |
Returns the current player animation. | |
int | player_viewpoint |
Returns the current player viewpoint: 0=1st person, 1=3rd person, 2=isometric, 3=fixed camera. | |
string | target_name |
This command returns the EntityName of the target. | |
float | enemy_X |
Returns the X coordinate of the currently targeted enemy. | |
float | enemy_Y |
Returns the Y coordinate of the currently targeted enemy. | |
float | enemy_Z |
Returns the Z coordinate of the currently targeted enemy. | |
bool | enemy_vis |
A read-only variable that is true if the current target is visible. If the target is visible the location of the target is updated in an internal variable used by other variables and functions. | |
bool | enemy_infront |
Returns true if the pawn is directly facing the current target. | |
float | enemy_yaw |
A read-only variable that contains the yaw angle, in radians, the pawn must face to be pointing at the target. | |
float | enemy_pitch |
A read-only variable that contains the pitch angle, in radians, the pawn must face to be pointing at the target. | |
float | enemy_range |
A read-only variable that contains the current distance the pawn is from its target. | |
float | last_enemy_yaw |
Returns the last known enemy_yaw of the previously targeted enemy. | |
float | last_enemy_pitch |
Returns the last known enemy_pitch of the previously targeted enemy. | |
float | last_enemy_range |
Returns the last known enemy_range of the previously targeted enemy. | |
bool | point_vis |
Returns true or false depending if the current ScriptPoint is visible or not. | |
string | point_name |
Returns the szEntityName of the current ScriptPoint. | |
float | camera_pitch |
Returns the current camera pitch. | |
int | LODLevel |
Returns the current LOD level of the pawn's actor. | |
int | current_screen_X |
Returns the X position of the pawn on the screen. | |
int | current_screen_Y |
Returns the Y position of the pawn on the screen. | |
int | player_screen_X |
Returns the X position of the player on the screen. | |
int | player_screen_Y |
Returns the Y position of the player on the screen. | |
int | key_pressed |
Returns the key number being pressed. Use the script below to see the key code for each key. | |
bool | lbutton_pressed |
Returns the state of the left mouse button. Deprecated, use Input.IsMouseButtonDown() instead. | |
bool | rbutton_pressed |
Returns the state of the right mouse button. Deprecated, use Input.IsMouseButtonDown() instead. | |
bool | mbutton_pressed |
Returns the state of the middle mouse button. Deprecated, use Input.IsMouseButtonDown() instead. |
Writable Variables | |
float | lowTime |
A write-only variable to reset the amount of time, in seconds, that has elapsed since low level scripting for this pawn started. | |
float | ThinkTime |
The amount of time, in seconds, that must elapse before the current order will be executed again. This is used to limit the number of times per second that the pawn's AI is run. By setting ThinkTime = 0.1; the pawn's AI will be run 10 times per second. This variable must be reset each time the AI is run. | |
string | think |
A write-only variable variable that is set to the name of the order that is to be executed the next time the pawn's AI is run. Used to change the 'think' order of the AI. | |
string | Icon |
A variable specifying the name of the CEGUI image used for the icon representing the pawn in conversations ("set:imageset image:imagename"). | |
float | yaw_speed |
A variable that must be set to the number of degrees per second that the pawn can rotate in yaw. Used by the rotation functions when rotating the pawn actor. | |
float | ideal_yaw |
A variable that must contain the yaw angle, in radians, that you wish to have the pawn rotate to. Used by the rotation functions when rotating the pawn. | |
float | pitch_speed |
A variable that must be set to the number of degrees per second that the pawn can rotate in pitch. Used by the rotation functions when rotating the pawn. | |
float | ideal_pitch |
A variable that must contain the pitch angle, in radians, that you wish to have the pawn rotate to. Used by the rotation functions when rotating the pawn. | |
float | attack_finished |
Unused variable. | |
int | attack_state |
Unused variable. |
All variables to control a pawn.
int PawnVariables::key_pressed |
Returns the key number being pressed. Use the script below to see the key code for each key.