All methods to control a pawn in low level mode. More...
Public Member Functions | |
void | PlayerRender (bool flag) |
Controls the rendering and collision detection of the player actor. | |
void | PawnRender (bool flag) |
Controls the rendering and collision detection of the pawn actor. | |
void | Render (bool flag) |
Controls the rendering and collision detection of the pawn actor. | |
void | SetFOV (float angle, string boneName="") |
Set the field of view (FOV) of the pawn to angle degrees. | |
void | StepHeight (float distance) |
Set the step height of the pawn to distance. | |
void | Gravity (bool state) |
Set whether the pawn will be affected by gravity. | |
void | SetBoundingBox (string animation, float width) |
Set the pawn's bounding box to the extents of the specified animation. | |
void | SetCollision () |
Set the actor's bounding box so collisions will occur with other objects. | |
void | SetNoCollision () |
Set the actor's bounding box so that no collisions with it will occur. | |
void | SetAlpha (float alpha) |
Set the transparency of the pawn's actor. | |
float | GetAlpha () |
Get the transparency of the pawn's actor. | |
void | SetScale (float scale) |
Set the scale of the pawn's actor to scale. | |
void | SetScale (float scaleX, float scaleY, float scaleZ) |
Set the scale of the pawn's actor to the given values. | |
void | SetPosition (string szEntityName, float x, float y, float z) |
Move the actor of the entity named szEntityName to the specified position. | |
void | PositionToPlatform (string movingPlatform, float offsetX, float offsetY, float offsetZ, bool rotate) |
Position the pawn to the MovingPlatform entity named movingPlatform. | |
void | PositionToPlayer (float offsetX, float offsetY, float offsetZ, bool playerAxes=false, bool rotate=false) |
Move the pawn's actor to the location of the player's actor and apply the offsets to that location. | |
void | PlayerToPosition (float offsetX, float offsetY, float offsetZ, bool pawnAxes=false, bool rotate=false) |
Move the player's actor to the location of the pawn's actor and apply the offsets to that location. | |
void | PositionToPawn (string pawnName, float offsetX, float offsetY, float offsetZ, bool pawnAxes=false, bool rotate=false) |
Move the pawn's actor to the location of the pawn whose szEntityName is pawnName and apply the offsets to that location. | |
void | PositionToBone (string szEntityName, string boneName) |
Position the pawn's actor to the bone boneName of the actor of the entity szEntityName. | |
void | TeleportToPoint (string pointName, float offsetX=0.0, float offsetY=0.0, float offsetZ=0.0, bool rotate=false, string szEntityName=self.EntityName) |
Teleport the entity szEntityName to the specified ScriptPoint. | |
void | TeleportEntity (string szEntityName, string pointName, float offsetX=0.0, float offsetY=0.0, float offsetZ=0.0, bool rotate=false) |
Teleports the entity szEntityName to the ScriptPoint named pointName. | |
bool | AutoWalk (float yaw, float speed, float distance) |
Rotate the pawn yaw radians around the y-axis, and move forward speed texels per second, keeping distance texels away from walls. | |
bool | walkmove (float yaw, float speed) |
Move the pawn at a speed of speed texels per second in the direction specified by yaw. | |
bool | flymove (float pitch, float yaw, float speed) |
Move the pawn at a speed of speed texels per second in the direction specified by pitch and yaw. | |
void | LookAtPawn (string szEntityName, float offsetY) |
Rotate the pawn to face the actor of the specified entity. | |
void | MatchPlayerAngles () |
Rotate the pawn's actor to match the player's rotation. | |
void | MatchEntityAngles (string szEntityName) |
Rotate the pawn's actor to match the angles of the specified entity. | |
void | PlayerMatchAngles (string szEntityName) |
Sets the player to match the rotation angles of the specified entity. | |
void | FacePoint () |
Immediately turns the pawn to face the current ScriptPoint. | |
void | ChangeYaw () |
Rotate the pawn's actor from its current yaw angle towards the yaw angle specified by self.ideal_yaw at a speed of self.yaw_speed degrees per second. | |
void | ChangePitch () |
Rotate the pawn's actor from its current pitch angle towards the pitch angle specified by self.ideal_pitch at a speed of self.pitch_speed degrees per second. | |
float | ConvertDegrees (float degrees) |
Converts an angle specified in degrees into radians. | |
void | ForceUp (float amount) |
Apply an upward force of amount to the pawn's actor. | |
void | ForceDown (float amount) |
Apply a downward force of amount to the pawn's actor. | |
void | ForceRight (float amount) |
Apply a force to the right of amount to the pawn's actor. | |
void | ForceLeft (float amount) |
Apply a force to the left of amount to the pawn's actor. | |
void | ForceForward (float amount) |
Apply a forward force of amount to the pawn's actor. | |
void | ForceBackward (float amount) |
Apply a backward force of amount to the pawn's actor. | |
void | ForceEntityUp (float amount, string szEntityName) |
Apply an upward force of amount to the entity's actor. | |
void | ForceEntityDown (float amount, string szEntityName) |
Apply a downward force of amount to the entity's actor. | |
void | ForceEntityRight (float amount, string szEntityName) |
Apply a force to the right of amount to the entity's actor. | |
void | ForceEntityLeft (float amount, string szEntityName) |
Apply a force to the left of amount to the entity's actor. | |
void | ForceEntityForward (float amount, string szEntityName) |
Apply a forward force of amount to the entity's actor. | |
void | ForceEntityBackward (float amount, string szEntityName) |
Apply a backward force of amount to the entity's actor. | |
void | Animate (string animation) |
Set the current animation of the pawn's actor to animation. | |
void | AnimateEntity (string animation, string szEntityName, bool holdAtEnd) |
Set the animation for the specified entity. | |
void | ResetAnimate (string animation, string boneName) |
Set the current animation of the pawn's actor to animation and move it to the position of the bone boneName. | |
void | AnimateHold (string animation) |
This is the same as the Animate method except it will hold the animation at the last frame. | |
void | AnimateTarget (string animation, bool holdAtEnd) |
This is similar to AnimateEntity but animates the targeted pawn. | |
void | AnimateBlend (string animation, float time) |
Blend to the first keyframe of the specified animation, in the specified time. | |
void | AnimationSpeed (float speed) |
Change the playback speed of the pawn's animation by multiplying it by speed (same as High Level method). | |
void | SetHoldAtEnd (bool holdAtEnd) |
If holdAtEnd is true then set the actor's animation to stop at the end of its animation. | |
void | LoadAnimation (string motionFile) |
Load a new animation from the motion file motionFile and add it to the pawn. | |
bool | InsertEvent (string motionName, string eventData, float keyTime) |
Insert new event data and key time for the specified motion. | |
string | CheckForEvent () |
Check if any event has occurred for the current motion of the pawn. | |
void | PlayEventSound (string szEntityName, float volume) |
Play the WAV file given by the event data string if an event has occured during the playback of the motion of the specified entity's actor. | |
void | ActivateTrigger (string trigger) |
Activate the Trigger entity called trigger as if it was activated by a pawn or the player. | |
void | SetEventState (string event, bool state) |
Set the state of the named trigger to state. | |
bool | GetEventState (string event) |
Return the state of the event trigger named event. | |
void | SetFlag (int flagID, bool state) |
Set the state of the pawn flag flagID to state. | |
bool | GetFlag (int flagID) |
Get the state of the pawn flag flagID. | |
void | NextPoint () |
Get the NextPoint entry from the current ScriptPoint and make it the current ScriptPoint. | |
void | NewPoint (string pointName) |
Make the ScriptPoint named pointName the current ScriptPoint. | |
bool | NearestPoint (float minDistance, float maxDistance) |
Search for the nearest visible ScriptPoint within the range minDistance - maxDistance and if one is found make it the current ScriptPoint (success is indicated by the return value). | |
bool | FastPointCheck (float distance) |
Check if the current valid ScriptPoint is within the specified range. | |
void | SetTargetPoint (float x, float y, float z, bool offset=true) |
Sets the specified point in space as the current target point. | |
float | GetPointYaw (string pointName) |
Get the yaw of the ScriptPoint named pointName. | |
float | GetPitchToPoint () |
Get the pitch between the pawn and the current ScriptPoint. | |
float | GetYawToPoint () |
Get the yaw between the pawn and the current ScriptPoint. | |
void | UpdateScriptPoint (string pointName, string szEntityName, float offsetX=0.0, float offsetY=0.0, float offsetZ=0.0, float angleX=0.0, float angleY=0.0, float angleZ=0.0) |
Move the ScriptPoint named pointName to the origin of the entity named szEntityName. | |
float | GetCollideDistance (string boneName, float offsetX, float offsetY, float offsetZ) |
Tests for collision between the bone's current position and the position with the offset applied. | |
bool | FastDistance (string szEntityName, float distance) |
Check if the entity named szEntityName is within the specified range. | |
float | GetDistanceTo (string szEntityName) |
Get the distance to the specified entity. | |
float | DistanceBetweenEntities (string fromEntityName, string toEntityName, bool ignoreY=false) |
Get the distance between two entities (Pawn, StaticEntityProxy, Attribute, Player). | |
bool | CheckArea (string fromEntityName, string toEntityName, bool distanceMode, float minScreenX, float maxScreenX, float minDistance, float maxDistance, bool ignoreX, bool ignoreY, bool ignoreZ) |
Returns true if the player or a pawn is within a specified area. | |
void | SetAttribute (string attribute, int amount, string szEntityName=self.EntityName) |
Set the value of the attribute attribute of the entity szEntityName to amount. | |
int | GetAttribute (string attribute, string szEntityName=self.EntityName) |
Get the amount of the attribute attribute of the entity szEntityName. | |
void | ModifyAttribute (string attribute, int amount, string szEntityName=self.EntityName) |
Modify the amount of the attribute attribute of the entity szEntityName by amount. | |
void | AddAttribute (string attribute, string szEntityName=self.EntityName) |
Give the entity szEntityName the attribute attribute, initialize it to 0 and set the low and high value limits to 0 and 100, respectively. | |
void | AddAttribute (string attribute, int low=0, int high=100, string szEntityName=self.EntityName) |
Give the entity szEntityName the attribute attribute, initialize it to 0 and set the low and high value limits. | |
void | SetAttributeValueLimits (string attribute, int low, int high, string szEntityName=self.EntityName) |
Set the low and high value limits of the attribute attribute of the entity szEntityName. | |
void | PowerUp (string attribute, int amount, bool setMaxAmount, string szEntityName=self.EntityName) |
Increase the upper limit of the of the attribute attribute of the entity szEntityName by amount. | |
int | GetPowerUpLevel (string attribute, string szEntityName=self.EntityName) |
Get the PowerUp level (how many times the attribute's upper limit was increased by the PowerUp method or the ModifyAttribute entity) of the entity's attribute attribute. | |
void | SaveAttributes (string filename) |
Saves the current player attributes to a text file of the specified name. | |
int | EnemyExist (string attribute) |
Get the state of the current target. | |
void | UpdateEnemyVis () |
Update the position of the current enemy regardless if it can be seen or not. | |
void | UpdateTarget () |
Update the point at which the pawn will fire a projectile. | |
void | SetTarget (string szEntiyName) |
Set the specified entity to be the current target. | |
void | TargetPlayer () |
Set the player as the current target. | |
void | SetPlayerWeapon (int weaponSlot) |
Set the player's weapon to the slot number specified. | |
void | FireProjectile (string projectile, string boneName, float offsetX, float offsetY, float offsetZ, string attribute, float amount=0.5) |
Shoot a projectile at the target point, as defined by UpdateTarget. | |
void | FireProjectileBlind (string projectile, string boneName, float offsetX, float offsetY, float offsetZ, string attribute) |
Fires a projectile without aiming at a target. | |
void | Damage (float amount, string attribute) |
Decrease the specified attribute of the pawn's target actor by amount. | |
void | DamagePlayer (float amount, string attribute) |
Decrease the specified attribute of the player by amount. | |
void | DamageEntity (float amount, string attribute, string szEntityName) |
Decrease the specified attribute of the given entity by amount. | |
void | DamageArea (float amount, float range, string attribute) |
Cause the specified amount of damage to the specified attribute of all actors and models within the given range. | |
void | DamageAtBone (float amount, float range, string attribute, string boneName) |
Cause the specified amount of damage to the specified attribute of all actors and models within the given range around the position of the bone named boneName. | |
void | Speak (string textSection, string sound, float textScrollSpeed, float textDisplayTime) |
Show a text string and optionally play a sound at the pawn's position during a conversation. If not in a conversation, just play back the specified sound file. | |
void | PlaySound (string filename) |
Play the WAV file filename once using the default audible range. | |
void | PlaySound (string filename, float distance) |
Play the WAV file filename once. | |
void | StartSoundTrack (string filename) |
Play the audio stream filename. | |
void | StopAllAudioStreams () |
Stop all audio streams. | |
void | AttachCamera () |
Attach the engine camera to the pawn. | |
void | AttachCameraToBone (string boneName) |
Attach the engine camera to the specified bone of the pawn. | |
void | AttachCameraToEntity (string szEntityName, string boneName) |
Attach the engine camera to the specified bone of the specified entity. | |
void | DetachCamera () |
Returns the camera control to the player. | |
void | TiltCamera (float angle) |
Tilts the camera up or down. | |
void | SwitchView (int viewMode) |
Switch to the specified view. | |
int | GetScreenWidth () |
Get the width of the screen. | |
int | GetScreenHeight () |
Get the height of the screen. | |
void | SetCameraWindow (float fov) |
Set the field of view of the camera. | |
void | SetCameraWindow (float fov, bool useWidthHeight, int left, int top, int width_right, int height_bottom) |
Set the field of view of the camera and the size of the camera viewport. | |
void | SetFixedCameraPosition (float x, float y, float z) |
Set the position of the currently active FixedCamera to (x, y, z). | |
void | SetFixedCameraRotation (float angleX, float angleY, float angleZ) |
Set the rotation of the currently active FixedCamera to (angleX, angleY, angleZ). | |
void | SetFixedCameraFOV (float fov) |
Set the field of view of the currently active FixedCamera. | |
void | MoveFixedCamera (float offsetX, float offsetY, float offsetZ) |
Move the currently active FixedCamera. | |
void | RotateFixedCamera (float angleX, float angleY, float angleZ) |
Rotate the currently active FixedCamera. | |
void | SetGravity (float x, float y, float z) |
Set the gravitational force. | |
float | GetGravityX () |
Get the x-component of the gravity. | |
float | GetGravityY () |
Get the y-component of the gravity. | |
float | GetGravityZ () |
Get the z-component of the gravity. | |
void | SetWind (float x, float y, float z) |
Set the wind force that influences particles. | |
float | GetWindX () |
Get the x-component of the wind. | |
float | GetWindY () |
Get the y-component of the wind. | |
float | GetWindZ () |
Get the z-component of the wind. | |
void | SetWindBase (float x, float y, float z) |
Set the constant part of the wind force that influences particles. | |
float | GetWindBaseX () |
Get the x-component of the wind base. | |
float | GetWindBaseY () |
Get the y-component of the wind base. | |
float | GetWindBaseZ () |
Get the z-component of the wind base. | |
void | SetWindGenerator (bool enable) |
Enable/Disable the WindGenerator entity. | |
bool | IsInLiquid () |
Check if the pawn is inside a Liquid entity. | |
string | GetLiquid () |
Get the name of the Liquid entity the pawn is in. | |
void | ChangeMaterial (string section) |
Change the material on the pawn's actor according to the specified section of material.ini. | |
void | ChangeWeaponMaterial (string section) |
Change the material on the pawn's weapon actor according to the specified section of material.ini. | |
bool | SetWeaponMatFromFlip (string flipbook, int actorMaterialIndex, int flipbookImageIndex, int r, int g, int b) |
Replace the pawn weapon's material with index actorMaterialIndex by the texture with index flipbookImageIndex of the specified FlipBook entity. | |
void | SetShadowFromFlip (string flipbook, string szEntityName) |
Set the images of a FlipBook entity as shadow bitmap for the specified entity's actor. | |
void | DrawPolyShadow () |
Draw a projected shadow beneath the pawn. | |
void | AddExplosion (string explosion, string boneName, float offsetX, float offsetY, float offsetZ) |
Attach an explosion effect predefined in explosion.ini to the specified actor bone. | |
void | DrawText (string text, int x, int y, string font) |
Display the given text onto the screen using the specified font and position. | |
void | ShowText (int textID, string szEntityName, string animation, string text, string font, string sound, int x, int y, string align, float alpha) |
Display the given text attached to an entity (Pawn, Attribute, StaticEntityProxy) or the player. | |
void | RemoveText (int textID) |
Remove the text object with the ID textID displayed by the ShowText or ShowTextDelay method. | |
void | SetGamma (float gamma) |
Set the gamma value. | |
float | GetGamma () |
Get the gamma value. | |
void | FillScreenArea (int areaID, bool keepVisible, float alpha, float r=0.0, float g=0.0, float b=0.0) |
Fill a rectangle on the screen with the given color and alpha. | |
void | FillScreenArea (int areaID, bool keepVisible, float alpha, float r, float g, float b, int left, int top, int right, int bottom) |
Fill a rectangle on the screen with the given color and alpha. | |
void | RemoveScreenArea (int areaID) |
Remove the area with the ID areaID. | |
void | ShowHudPicture (int pictureID, bool show) |
Show or hide a HUD picture element (BMP, JPG, TGA, PNG or animated GIF). | |
void | ShowHudPicture (int pictureID, bool show, string szEntityName, int x, int y, float time, int left=0, int top=0) |
Show or hide a HUD picture element (BMP, JPG, TGA, PNG or animated GIF). | |
string | MouseSelect (bool highlight, bool selectablePlayer=false, float fillColorR=255.0, float fillColorG=255.0, float fillColorB=255.0, float ambientColorR=255.0, float ambientColorG=255.0, float ambientColorB=255.0) |
Get the szEntityName of an actor whose bounding box is below the cursor. | |
void | MouseControlledPlayer (bool flag) |
Define whether the player can be controlled with the mouse or not. | |
void | ShowMouse (bool show) |
Show or hide the mouse cursor. | |
int | GetMousePosX () |
Get the x-position of the mouse cursor. | |
int | GetMousePosY () |
Get the y-position of the mouse cursor. | |
void | SetMousePos (int x, int y) |
Set the mouse cursor to the specified position. | |
bool | IsButtonDown (int joystickID, int buttonID) |
Get the state of the button with the ID buttonID of the specified joystick. | |
int | GetJoyAxisX (int joystickID) |
Get the left-right movement of the specified joystick. | |
int | GetJoyAxisY (int joystickID) |
Get the forward-backward movement of the specified joystick. | |
int | GetJoyAxisZ (int joystickID) |
Checks z-axis (often the throttle control) of the specified joystick. | |
int | GetNumJoysticks () |
Get the number of joysticks connected to the system. | |
bool | IsEntityVsible (string szEntityName) |
Check if the specified entity is visible. | |
void | SetEntityLighting (string szEntityName, float fillColorR, float fillColorG, float fillColorB, float ambientColorR, float ambientColorG, float ambientColorB) |
Set the FillColor and AmbientColor of the specified entity. | |
void | SetEntityAlpha (string szEntityName, float alpha) |
Set the transparency of the specified entity. | |
float | GetEntityAlpha (string szEntityName) |
Get the transparency of the specified entity. | |
void | SetEntityScale (string szEntityName, float scale) |
Set the scale of the entity's actor to the scale. | |
void | SetEntityScale (string szEntityName, float scaleX, float scaleY, float scaleZ) |
Set the scale of the entity's actor to the given values. | |
void | SetEntityPosition (string szEntityName, float x, float y, float z) |
Set the position of the specified entity. | |
void | SetEntityRotation (string szEntityName, float x, float y, float z) |
Set the rotation of the specified entity to (x, y, z). | |
void | MoveEntity (string szEntityName, float x, float y, float z) |
Move the specified entity. | |
void | RotateEntity (string szEntityName, float x, float y, float z) |
Rotate the specified entity. | |
float | GetEntityX (string szEntityName) |
Get the x-position of the specified entity. | |
float | GetEntityY (string szEntityName) |
Get the y-position of the specified entity. | |
float | GetEntityZ (string szEntityName) |
Get the z-position of the specified entity. | |
float | GetEntityYaw (string szEntityName) |
Get the yaw of the specified entity. | |
int | GetEntityScreenX (string szEntityName) |
Get the x-coordinate of the specified entity on the screen. | |
int | GetEntityScreenY (string szEntityName) |
Get the y-coordinate of the specified entity on the screen. | |
float | GetBoneX (string szEntityName, string boneName) |
Get the x-coordinate of the specified bone for the given entity. | |
float | GetBoneY (string szEntityName, string boneName) |
Get the y-coordinate of the specified bone for the given entity. | |
float | GetBoneZ (string szEntityName, string boneName) |
Get the z-coordinate of the specified bone for the given entity. | |
float | GetBoneYaw (string szEntityName, string boneName) |
Get the yaw of the specified bone for the given entity. | |
float | GetBoneToBone (string boneName, string targetEntityName, string targetBoneName) |
Get the distance between the pawn's bone and the specified target's bone. | |
string | GetLastBoneHit () |
Get the name of the bone last hit in this pawn. | |
int | GetStringLength (string text) |
Get the length of the given string. | |
string | StringCopy (string text) |
Transfer the contents of the given string variable into another string variable. | |
string | LeftCopy (string text, int numChars) |
Get the first numChars characters from the given string. | |
string | RightCopy (string text, int numChars) |
Get the last numChars characters from the given string. | |
void | debug (int variable) |
Output the contents of variable to the console window for this pawn, assuming the console is active. | |
void | HighLevel (string order) |
Return to executing the script as high level methods at the next frame. | |
void | EndScript () |
Stop the execution of the script (without removing the pawn's actor). | |
void | SetHudDraw (bool show) |
Show or hide the HUD. | |
bool | GetHudDraw () |
Get the Hud drawing state. | |
void | ActivateHudElement (string attribute, bool activate) |
Activate or deactivate the HUD element representing the specified attribute. | |
int | GetCurFlipBook (string flipbook) |
Get the index of the current image of the specified FlipBook entity. | |
string | GetGroundTexture () |
Get the name of the texture beneath the pawn. | |
string | GetPlayerGroundTexture () |
Get the name of the texture beneath the player. | |
void | SetUseItem (string item) |
Set the specified item to be the current Use Item. | |
void | ClearUseItem (string item) |
Remove the specified Use Item. | |
void | SetKeyPause (bool pause) |
Pause or restore the keyboard control. | |
bool | IsKeyDown (int key) |
Check if the specified key is pressed. | |
string | TraceToActor (string boneName, float offsetX, float offsetY, float offsetZ) |
Trace a line from the specified bone to a point defined by a specified offset and return the szEntityName of any pawn actor that it intersects. | |
int | WhereIsPlayer () |
Get the direction to the player. | |
int | WhereIsEntity (string szEntityName) |
Get the direction to the specified entity. | |
int | random (int lower, int upper) |
Generate a random integer number in the range lower to upper. | |
int | Integer (float value) |
Get the integer portion of the given value. | |
float | sin (float value) |
Get the sine of the given value. | |
float | cos (float value) |
Get the cosine of the given value. | |
float | tan (float value) |
Get the tangent of the given value. | |
float | asin (float value) |
Get the arc sine of the given value. | |
float | acos (float value) |
Get the arc cosine of the given value. | |
float | atan (float value) |
Get the arc tangent of the given value. |
All methods to control a pawn in low level mode.
void PawnLow::PlayerRender | ( | bool | flag | ) |
Controls the rendering and collision detection of the player actor.
flag |
|
void PawnLow::PawnRender | ( | bool | flag | ) |
Controls the rendering and collision detection of the pawn actor.
Also affects any attached weapon actors.
flag |
|
void PawnLow::Render | ( | bool | flag | ) |
Controls the rendering and collision detection of the pawn actor.
Also affects any attached weapon actors.
flag |
|
void PawnLow::SetFOV | ( | float | angle, |
string | boneName = "" |
||
) |
Set the field of view (FOV) of the pawn to angle degrees.
This is the total number of degrees from left to right that the pawn can see. The center of the FOV is the direction the pawn or the pawn actor's bone boneName is facing.
angle | Field of view in degrees. |
boneName | String holding the name of a bone present in the pawn's actor, or empty to use the root bone. |
void PawnLow::StepHeight | ( | float | distance | ) |
Set the step height of the pawn to distance.
distance | Specifies the maximum step height. If less than or equal to zero then step up is disabled for this pawn. |
void PawnLow::Gravity | ( | bool | state | ) |
Set whether the pawn will be affected by gravity.
state |
|
void PawnLow::SetBoundingBox | ( | string | animation, |
float | width | ||
) |
Set the pawn's bounding box to the extents of the specified animation.
If width is larger than zero, use this value for the width and depth of the bounding box.
animation | String holding the name of an animation present in the pawn's actor. |
width | if larger than zero, use this value for the width and depth of the bounding box. |
void PawnLow::SetCollision | ( | ) |
Set the actor's bounding box so collisions will occur with other objects.
void PawnLow::SetNoCollision | ( | ) |
Set the actor's bounding box so that no collisions with it will occur.
The actor will appear in the level but not as a solid object.
void PawnLow::SetAlpha | ( | float | alpha | ) |
Set the transparency of the pawn's actor.
alpha | float value specifying the transparency of the actor with 0.0 being fully transparent and 255.0 being fully opaque. |
float PawnLow::GetAlpha | ( | ) |
Get the transparency of the pawn's actor.
void PawnLow::SetScale | ( | float | scale | ) |
Set the scale of the pawn's actor to scale.
scale | float value specifying the scale of the actor in x, y and z direction. |
void PawnLow::SetScale | ( | float | scaleX, |
float | scaleY, | ||
float | scaleZ | ||
) |
Set the scale of the pawn's actor to the given values.
scaleX | float value specifying the scale of the actor in x direction. |
scaleY | float value specifying the scale of the actor in y direction. |
scaleZ | float value specifying the scale of the actor in z direction. |
void PawnLow::SetPosition | ( | string | szEntityName, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Move the actor of the entity named szEntityName to the specified position.
szEntityName | String holding the name of the entity to move. |
x | float value specifying the x position. |
y | float value specifying the y position. |
z | float value specifying the z position. |
void PawnLow::PositionToPlatform | ( | string | movingPlatform, |
float | offsetX, | ||
float | offsetY, | ||
float | offsetZ, | ||
bool | rotate | ||
) |
Position the pawn to the MovingPlatform entity named movingPlatform.
movingPlatform | String holding the name of a MovingPlatform entity. |
offsetX | float value specifying the offset in x direction from the platform's origin. |
offsetY | float value specifying the offset in y direction from the platform's origin. |
offsetZ | float value specifying the offset in z direction from the platform's origin. |
rotate | boolean value that determines whether or not the pawn will match the rotation of the platform's model. |
void PawnLow::PositionToPlayer | ( | float | offsetX, |
float | offsetY, | ||
float | offsetZ, | ||
bool | playerAxes = false , |
||
bool | rotate = false |
||
) |
Move the pawn's actor to the location of the player's actor and apply the offsets to that location.
offsetX | float value specifying the offset in x direction from the player's position. |
offsetY | float value specifying the offset in y direction from the player's position. |
offsetZ | float value specifying the offset in z direction from the player's position. |
playerAxes |
|
rotate | boolean value that determines whether or not the pawn will match the rotation of the player. |
void PawnLow::PlayerToPosition | ( | float | offsetX, |
float | offsetY, | ||
float | offsetZ, | ||
bool | pawnAxes = false , |
||
bool | rotate = false |
||
) |
Move the player's actor to the location of the pawn's actor and apply the offsets to that location.
offsetX | float value specifying the offset in x direction from the pawn's position. |
offsetY | float value specifying the offset in y direction from the pawn's position. |
offsetZ | float value specifying the offset in z direction from the pawn's position. |
pawnAxes |
|
rotate | boolean value that determines whether or not the player will match the rotation of the pawn. |
void PawnLow::PositionToPawn | ( | string | pawnName, |
float | offsetX, | ||
float | offsetY, | ||
float | offsetZ, | ||
bool | pawnAxes = false , |
||
bool | rotate = false |
||
) |
Move the pawn's actor to the location of the pawn whose szEntityName is pawnName and apply the offsets to that location.
pawnName | String holding the name of a pawn entity. |
offsetX | float value specifying the offset in x direction from the position of the pawn pawnName. |
offsetY | float value specifying the offset in y direction from the position of the pawn pawnName. |
offsetZ | float value specifying the offset in z direction from the position of the pawn pawnName. |
pawnAxes |
|
rotate | boolean value that determines whether or not the pawn will match the rotation of the pawn pawnName. |
void PawnLow::PositionToBone | ( | string | szEntityName, |
string | boneName | ||
) |
Position the pawn's actor to the bone boneName of the actor of the entity szEntityName.
szEntityName | String holding the name of the entity. |
boneName | String holding the name of a bone present in the actor of the entity szEntityName. |
void PawnLow::TeleportToPoint | ( | string | pointName, |
float | offsetX = 0.0 , |
||
float | offsetY = 0.0 , |
||
float | offsetZ = 0.0 , |
||
bool | rotate = false , |
||
string | szEntityName = self.EntityName |
||
) |
Teleport the entity szEntityName to the specified ScriptPoint.
pointName | String holding the name of a ScriptPoint entity. |
offsetX | float value specifying the offset in x direction from the position of the ScriptPoint pointName. |
offsetY | float value specifying the offset in y direction from the position of the ScriptPoint pointName. |
offsetZ | float value specifying the offset in z direction from the position of the ScriptPoint pointName. |
rotate | boolean value that determines whether or not the entity will match the SriptPoint angles after teleport. |
szEntityName | String holding the name of the entity to teleport. |
void PawnLow::TeleportEntity | ( | string | szEntityName, |
string | pointName, | ||
float | offsetX = 0.0 , |
||
float | offsetY = 0.0 , |
||
float | offsetZ = 0.0 , |
||
bool | rotate = false |
||
) |
Teleports the entity szEntityName to the ScriptPoint named pointName.
szEntityName | String holding the name of the entity to teleport. |
pointName | String holding the name of a ScriptPoint entity. |
offsetX | float value specifying the offset in x direction from the position of the ScriptPoint pointName. |
offsetY | float value specifying the offset in y direction from the position of the ScriptPoint pointName. |
offsetZ | float value specifying the offset in z direction from the position of the ScriptPoint pointName. |
rotate | boolean value that determines whether or not the entity will match the SriptPoint angles after teleport. |
bool PawnLow::AutoWalk | ( | float | yaw, |
float | speed, | ||
float | distance | ||
) |
Rotate the pawn yaw radians around the y-axis, and move forward speed texels per second, keeping distance texels away from walls.
yaw | float value specifying the rotation (radians) around the y-axis. |
speed | float value specifying the speed (texels/second) at which the pawn will be moved forward. |
distance | float value specifying the distance (texels) to keep away from walls. |
bool PawnLow::walkmove | ( | float | yaw, |
float | speed | ||
) |
Move the pawn at a speed of speed texels per second in the direction specified by yaw.
yaw | float value specifying the rotation (radians) around the y-axis. |
speed | float value specifying the speed (texels/second) at which the pawn will be moved forward. |
bool PawnLow::flymove | ( | float | pitch, |
float | yaw, | ||
float | speed | ||
) |
Move the pawn at a speed of speed texels per second in the direction specified by pitch and yaw.
pitch | float value specifying the rotation (radians) around the x-axis. |
yaw | float value specifying the rotation (radians) around the y-axis. |
speed | float value specifying the speed (texels/second) at which the pawn will be moved forward. |
void PawnLow::LookAtPawn | ( | string | szEntityName, |
float | offsetY | ||
) |
Rotate the pawn to face the actor of the specified entity.
szEntityName | String holding the name of the entity. |
offsetY | float value specifying the offset from the root bone of the target actor in y direction. |
void PawnLow::MatchPlayerAngles | ( | ) |
Rotate the pawn's actor to match the player's rotation.
void PawnLow::MatchEntityAngles | ( | string | szEntityName | ) |
Rotate the pawn's actor to match the angles of the specified entity.
szEntityName | String holding the name of the entity. |
void PawnLow::PlayerMatchAngles | ( | string | szEntityName | ) |
Sets the player to match the rotation angles of the specified entity.
szEntityName | String holding the name of the entity. |
void PawnLow::FacePoint | ( | ) |
Immediately turns the pawn to face the current ScriptPoint.
void PawnLow::ChangeYaw | ( | ) |
Rotate the pawn's actor from its current yaw angle towards the yaw angle specified by self.ideal_yaw at a speed of self.yaw_speed degrees per second.
When the pawn's yaw angle reaches the desired angle, rotation will cease.
void PawnLow::ChangePitch | ( | ) |
Rotate the pawn's actor from its current pitch angle towards the pitch angle specified by self.ideal_pitch at a speed of self.pitch_speed degrees per second.
When the pawn's pitch angle reaches the desired angle, rotation will cease.
float PawnLow::ConvertDegrees | ( | float | degrees | ) |
Converts an angle specified in degrees into radians.
degrees | Specifies the angle in degrees to convert into radians. |
void PawnLow::ForceUp | ( | float | amount | ) |
Apply an upward force of amount to the pawn's actor.
Used to make the pawn jump.
amount | Specifies the amount of force. |
void PawnLow::ForceDown | ( | float | amount | ) |
Apply a downward force of amount to the pawn's actor.
amount | Specifies the amount of force. |
void PawnLow::ForceRight | ( | float | amount | ) |
Apply a force to the right of amount to the pawn's actor.
amount | Specifies the amount of force. |
void PawnLow::ForceLeft | ( | float | amount | ) |
Apply a force to the left of amount to the pawn's actor.
amount | Specifies the amount of force. |
void PawnLow::ForceForward | ( | float | amount | ) |
Apply a forward force of amount to the pawn's actor.
amount | Specifies the amount of force. |
void PawnLow::ForceBackward | ( | float | amount | ) |
Apply a backward force of amount to the pawn's actor.
amount | Specifies the amount of force. |
void PawnLow::ForceEntityUp | ( | float | amount, |
string | szEntityName | ||
) |
Apply an upward force of amount to the entity's actor.
Used to make the entity jump.
amount | Specifies the amount of force. |
szEntityName | String holding the name of the entity. |
void PawnLow::ForceEntityDown | ( | float | amount, |
string | szEntityName | ||
) |
Apply a downward force of amount to the entity's actor.
amount | Specifies the amount of force. |
szEntityName | String holding the name of the entity. |
void PawnLow::ForceEntityRight | ( | float | amount, |
string | szEntityName | ||
) |
Apply a force to the right of amount to the entity's actor.
amount | Specifies the amount of force. |
szEntityName | String holding the name of the entity. |
void PawnLow::ForceEntityLeft | ( | float | amount, |
string | szEntityName | ||
) |
Apply a force to the left of amount to the entity's actor.
amount | Specifies the amount of force. |
szEntityName | String holding the name of the entity. |
void PawnLow::ForceEntityForward | ( | float | amount, |
string | szEntityName | ||
) |
Apply a forward force of amount to the entity's actor.
amount | Specifies the amount of force. |
szEntityName | String holding the name of the entity. |
void PawnLow::ForceEntityBackward | ( | float | amount, |
string | szEntityName | ||
) |
Apply a backward force of amount to the entity's actor.
amount | Specifies the amount of force. |
szEntityName | String holding the name of the entity. |
void PawnLow::Animate | ( | string | animation | ) |
Set the current animation of the pawn's actor to animation.
animation | String holding the name of the animation. |
void PawnLow::AnimateEntity | ( | string | animation, |
string | szEntityName, | ||
bool | holdAtEnd | ||
) |
Set the animation for the specified entity.
animation | String holding the name of the animation. |
szEntityName | String holding the name of the entity. |
holdAtEnd | boolean value that determines whether or not to hold the animation at the end. |
void PawnLow::ResetAnimate | ( | string | animation, |
string | boneName | ||
) |
Set the current animation of the pawn's actor to animation and move it to the position of the bone boneName.
animation | String holding the name of the animation. |
boneName | String holding the name of a bone present in the pawn's actor. |
void PawnLow::AnimateHold | ( | string | animation | ) |
This is the same as the Animate method except it will hold the animation at the last frame.
animation | String holding the name of the animation. |
void PawnLow::AnimateTarget | ( | string | animation, |
bool | holdAtEnd | ||
) |
This is similar to AnimateEntity but animates the targeted pawn.
animation | String holding the name of the animation. |
holdAtEnd | boolean value that determines whether or not to hold the animation at the end. |
void PawnLow::AnimateBlend | ( | string | animation, |
float | time | ||
) |
Blend to the first keyframe of the specified animation, in the specified time.
The blend will hold at the first keyframe of the specified motion.
animation | String holding the name of the animation to blend to. |
time | float value that determines the duration of the blending. |
void PawnLow::AnimationSpeed | ( | float | speed | ) |
Change the playback speed of the pawn's animation by multiplying it by speed (same as High Level method).
speed | Specifies the multiplication factor for the playback speed of the animation. |
void PawnLow::SetHoldAtEnd | ( | bool | holdAtEnd | ) |
If holdAtEnd is true then set the actor's animation to stop at the end of its animation.
The animation can then be tested by self.animate_at_end to see if the end has been reached.
holdAtEnd | boolean value that determines whether or not to hold the animation at the end. |
void PawnLow::LoadAnimation | ( | string | motionFile | ) |
Load a new animation from the motion file motionFile and add it to the pawn.
motionFile | String holding the name of a valid motion file. |
bool PawnLow::InsertEvent | ( | string | motionName, |
string | eventData, | ||
float | keyTime | ||
) |
Insert new event data and key time for the specified motion.
Only one event is allowed per time key.
motionName | String holding the name of a valid motion. |
eventData | String holding arbitrary data. Typically this is used to store the name of a WAV file. |
keyTime | float value that determines the time key of the event. |
string PawnLow::CheckForEvent | ( | ) |
Check if any event has occurred for the current motion of the pawn.
void PawnLow::PlayEventSound | ( | string | szEntityName, |
float | volume | ||
) |
Play the WAV file given by the event data string if an event has occured during the playback of the motion of the specified entity's actor.
szEntityName | String holding the name of the entity whose actor is to be checked. |
volume | Specifies the volume of the sound to be played. |
void PawnLow::ActivateTrigger | ( | string | trigger | ) |
Activate the Trigger entity called trigger as if it was activated by a pawn or the player.
This is not the same as SetEventState.
trigger | String holding the name of the Trigger entity to activate. |
void PawnLow::SetEventState | ( | string | event, |
bool | state | ||
) |
Set the state of the named trigger to state.
If the trigger does not exist it will be created.
event | String holding the name of an event trigger. |
state | boolean value specifying the new state of the event trigger. |
bool PawnLow::GetEventState | ( | string | event | ) |
Return the state of the event trigger named event.
event | String holding the name of the event trigger. |
void PawnLow::SetFlag | ( | int | flagID, |
bool | state | ||
) |
Set the state of the pawn flag flagID to state.
flagID | integer value (0 - 499) identifying the pawn flag to be set. |
state | boolean value specifying the new state of the pawn flag. |
bool PawnLow::GetFlag | ( | int | flagID | ) |
Get the state of the pawn flag flagID.
flagID | integer value (0 - 499) identifying the pawn flag. |
void PawnLow::NextPoint | ( | ) |
Get the NextPoint entry from the current ScriptPoint and make it the current ScriptPoint.
If no entry exists then the current ScriptPoint will be invalid and references to it will be ignored. (same as High Level method)
void PawnLow::NewPoint | ( | string | pointName | ) |
Make the ScriptPoint named pointName the current ScriptPoint.
The current order is still maintained and will continue to be executed. (same as High Level method)
pointName | String holding the name of the new ScriptPoint. |
bool PawnLow::NearestPoint | ( | float | minDistance, |
float | maxDistance | ||
) |
Search for the nearest visible ScriptPoint within the range minDistance - maxDistance and if one is found make it the current ScriptPoint (success is indicated by the return value).
minDistance | Specifies the minimum range to search for a ScriptPoint. |
maxDistance | Specifies the maximum range to search for a ScriptPoint. |
bool PawnLow::FastPointCheck | ( | float | distance | ) |
Check if the current valid ScriptPoint is within the specified range.
distance | Specifies the range to check for the current ScriptPoint. |
void PawnLow::SetTargetPoint | ( | float | x, |
float | y, | ||
float | z, | ||
bool | offset = true |
||
) |
Sets the specified point in space as the current target point.
x | float value specifying the x position. |
y | float value specifying the y position. |
z | float value specifying the z position. |
offset |
|
float PawnLow::GetPointYaw | ( | string | pointName | ) |
Get the yaw of the ScriptPoint named pointName.
pointName | String holding the name of a ScriptPoint entity. |
float PawnLow::GetPitchToPoint | ( | ) |
Get the pitch between the pawn and the current ScriptPoint.
float PawnLow::GetYawToPoint | ( | ) |
Get the yaw between the pawn and the current ScriptPoint.
void PawnLow::UpdateScriptPoint | ( | string | pointName, |
string | szEntityName, | ||
float | offsetX = 0.0 , |
||
float | offsetY = 0.0 , |
||
float | offsetZ = 0.0 , |
||
float | angleX = 0.0 , |
||
float | angleY = 0.0 , |
||
float | angleZ = 0.0 |
||
) |
Move the ScriptPoint named pointName to the origin of the entity named szEntityName.
Optionally a positional offset and a new orientation can be applied.
pointName | String holding the name of the ScriptPoint entity to be updated. |
szEntityName | String holding the name of an entity to move the ScriptPoint to. |
offsetX | float value specifying the offset in x-direction. |
offsetY | float value specifying the offset in y-direction. |
offsetZ | float value specifying the offset in z-direction. |
angleX | float value specifying the new rotation around the x-axis. |
angleY | float value specifying the new rotation around the y-axis. |
angleZ | float value specifying the new rotation around the z-axis. |
float PawnLow::GetCollideDistance | ( | string | boneName, |
float | offsetX, | ||
float | offsetY, | ||
float | offsetZ | ||
) |
Tests for collision between the bone's current position and the position with the offset applied.
boneName | String holding the name of a bone present in the pawn's actor. |
offsetX | float value specifying the offset in x-direction. |
offsetY | float value specifying the offset in y-direction. |
offsetZ | float value specifying the offset in z-direction. |
bool PawnLow::FastDistance | ( | string | szEntityName, |
float | distance | ||
) |
Check if the entity named szEntityName is within the specified range.
szEntityName | String holding the name of the entity to search for. |
distance | float value specifying the range to check for the given entity. |
float PawnLow::GetDistanceTo | ( | string | szEntityName | ) |
Get the distance to the specified entity.
szEntityName | String holding the name of the entity to get the distance to. |
float PawnLow::DistanceBetweenEntities | ( | string | fromEntityName, |
string | toEntityName, | ||
bool | ignoreY = false |
||
) |
Get the distance between two entities (Pawn, StaticEntityProxy, Attribute, Player).
To specify the player use "Player"
as one of the entity names.
fromEntityName | String holding the name of the first entity. |
toEntityName | String holding the name of the second entity. |
ignoreY |
|
bool PawnLow::CheckArea | ( | string | fromEntityName, |
string | toEntityName, | ||
bool | distanceMode, | ||
float | minScreenX, | ||
float | maxScreenX, | ||
float | minDistance, | ||
float | maxDistance, | ||
bool | ignoreX, | ||
bool | ignoreY, | ||
bool | ignoreZ | ||
) |
Returns true if the player or a pawn is within a specified area.
This area is defined in the horizontal direction by minScreenX and maxScreenX coordinates and in the vertical direction by minDistance and maxDistance the pawn/player/mouse is moved away from the pawn/player/camera/nothing.
fromEntityName | String holding the name of the first entity. This may be "Player" , "Camera" , "Mouse" or the entity name of a Pawn. The origin of this entity is used as starting point for the distance measurement. |
toEntityName | String holding the name of the second entity. This may be "Player" or the entity name of a Pawn. The origin of this entity is used as end point for the distance measurement. If the toEntityName is left empty ("" ), then the distanceMode is forced to true. |
distanceMode | boolean value defining whether minDistance/maxDistance are interpreted as the 3D depth (Distance) or the screen height (Screen Y).
|
minScreenX | float value defining the left x-coordinate (in screen space) of the area to check. |
maxScreenX | float value defining the right x-coordinate (in screen space) of the area to check. |
minDistance | If distanceMode is true, the 3D depth is used to define the corners of the area to check in world space. Otherwise the screen height is used to define the corner points of the area to check in screen space. |
maxDistance | float value. |
ignoreX |
|
ignoreY |
|
ignoreZ |
|
void PawnLow::SetAttribute | ( | string | attribute, |
int | amount, | ||
string | szEntityName = self.EntityName |
||
) |
Set the value of the attribute attribute of the entity szEntityName to amount.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to change. |
amount | integer value determining the new value of the specified attribute. |
szEntityName | String holding the name of the entity owning the attribute. |
int PawnLow::GetAttribute | ( | string | attribute, |
string | szEntityName = self.EntityName |
||
) |
Get the amount of the attribute attribute of the entity szEntityName.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnLow::ModifyAttribute | ( | string | attribute, |
int | amount, | ||
string | szEntityName = self.EntityName |
||
) |
Modify the amount of the attribute attribute of the entity szEntityName by amount.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to change. |
amount | integer value determining the amount the specified attribute will be modified by. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnLow::AddAttribute | ( | string | attribute, |
string | szEntityName = self.EntityName |
||
) |
Give the entity szEntityName the attribute attribute, initialize it to 0 and set the low and high value limits to 0 and 100, respectively.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to create. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnLow::AddAttribute | ( | string | attribute, |
int | low = 0 , |
||
int | high = 100 , |
||
string | szEntityName = self.EntityName |
||
) |
Give the entity szEntityName the attribute attribute, initialize it to 0 and set the low and high value limits.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to create. |
low | integer value determining the low value limit of the new attribute. |
high | integer value determining the high value limit of the new attribute. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnLow::SetAttributeValueLimits | ( | string | attribute, |
int | low, | ||
int | high, | ||
string | szEntityName = self.EntityName |
||
) |
Set the low and high value limits of the attribute attribute of the entity szEntityName.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to modify. |
low | integer value determining the new low value limit of the attribute. |
high | integer value determining the new high value limit of the attribute. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnLow::PowerUp | ( | string | attribute, |
int | amount, | ||
bool | setMaxAmount, | ||
string | szEntityName = self.EntityName |
||
) |
Increase the upper limit of the of the attribute attribute of the entity szEntityName by amount.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to modify. |
amount | integer value determining the amount by which to increase the high value limit of the attribute. |
setMaxAmount |
|
szEntityName | String holding the name of the entity owning the attribute. |
int PawnLow::GetPowerUpLevel | ( | string | attribute, |
string | szEntityName = self.EntityName |
||
) |
Get the PowerUp level (how many times the attribute's upper limit was increased by the PowerUp method or the ModifyAttribute entity) of the entity's attribute attribute.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to check. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnLow::SaveAttributes | ( | string | filename | ) |
Saves the current player attributes to a text file of the specified name.
filename | String holding the name of the file to write to. |
int PawnLow::EnemyExist | ( | string | attribute | ) |
Get the state of the current target.
If this method returns 0 or 1 then the target is gone or of no interest to the pawn. A return value of 2 means the target is dead and the body is still visible. A return value of 3 means the target is alive.
attribute | String holding the name of the target's attribute to check. |
void PawnLow::UpdateEnemyVis | ( | ) |
Update the position of the current enemy regardless if it can be seen or not.
void PawnLow::UpdateTarget | ( | ) |
Update the point at which the pawn will fire a projectile.
This point is updated to the last known location of the target. By not updating this point every frame you can adjust the shooting skill of the pawn.
void PawnLow::SetTarget | ( | string | szEntiyName | ) |
Set the specified entity to be the current target.
szEntiyName | String holding the name of the entity to target. |
void PawnLow::TargetPlayer | ( | ) |
Set the player as the current target.
void PawnLow::SetPlayerWeapon | ( | int | weaponSlot | ) |
Set the player's weapon to the slot number specified.
weaponSlot | integer value specifying the weapon slot number (0 - 39). |
void PawnLow::FireProjectile | ( | string | projectile, |
string | boneName, | ||
float | offsetX, | ||
float | offsetY, | ||
float | offsetZ, | ||
string | attribute, | ||
float | amount = 0.5 |
||
) |
Shoot a projectile at the target point, as defined by UpdateTarget.
projectile | String holding the name of the projectile type to fire. |
boneName | String holding the name of a bone in the pawn (or the pawn's weapon actor if present) acting as launch location. |
offsetX | Specifies the offset in x-direction (left) from the bone's orientation. |
offsetY | Specifies the offset in y-direction (up) from the bone's orientation. |
offsetZ | Specifies the offset in z-direction (in) from the bone's orientation. |
attribute | String holding the name of the attribute to damage. |
amount | float value (0.0 - 1.0) specifying the percentage of the target actor's height to aim at. |
void PawnLow::FireProjectileBlind | ( | string | projectile, |
string | boneName, | ||
float | offsetX, | ||
float | offsetY, | ||
float | offsetZ, | ||
string | attribute | ||
) |
Fires a projectile without aiming at a target.
projectile | String holding the name of the projectile type to fire. |
boneName | String holding the name of a bone in the pawn (or the pawn's weapon actor if present) acting as launch location. |
offsetX | Specifies the offset in x-direction (left) from the bone's orientation. |
offsetY | Specifies the offset in y-direction (up) from the bone's orientation. |
offsetZ | Specifies the offset in z-direction (in) from the bone's orientation. |
attribute | String holding the name of the attribute to damage. |
void PawnLow::Damage | ( | float | amount, |
string | attribute | ||
) |
Decrease the specified attribute of the pawn's target actor by amount.
amount | Specifies the amount the given attribute will be decreased. |
attribute | String holding the name of the attribute to decrease. |
void PawnLow::DamagePlayer | ( | float | amount, |
string | attribute | ||
) |
Decrease the specified attribute of the player by amount.
amount | Specifies the amount the given attribute will be decreased. |
attribute | String holding the name of the attribute to decrease. |
void PawnLow::DamageEntity | ( | float | amount, |
string | attribute, | ||
string | szEntityName | ||
) |
Decrease the specified attribute of the given entity by amount.
Since an attached pawn does not know if the master pawn is 'dead', this method can be used to 'kill' the master or slave pawn. This allows for a 'head shot' to kill 'the body'.
amount | Specifies the amount the given attribute will be decreased. |
attribute | String holding the name of the attribute to decrease. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnLow::DamageArea | ( | float | amount, |
float | range, | ||
string | attribute | ||
) |
Cause the specified amount of damage to the specified attribute of all actors and models within the given range.
amount | Specifies the amount the given attribute will be decreased. |
range | Specifies the range of the effect. |
attribute | String holding the name of the attribute to decrease. |
void PawnLow::DamageAtBone | ( | float | amount, |
float | range, | ||
string | attribute, | ||
string | boneName | ||
) |
Cause the specified amount of damage to the specified attribute of all actors and models within the given range around the position of the bone named boneName.
amount | Specifies the amount the given attribute will be decreased. |
range | Specifies the range of the effect. |
attribute | String holding the name of the attribute to decrease. |
boneName | String holding the name of a bone present in the pawn. |
void PawnLow::Speak | ( | string | textSection, |
string | sound, | ||
float | textScrollSpeed, | ||
float | textDisplayTime | ||
) |
Show a text string and optionally play a sound at the pawn's position during a conversation. If not in a conversation, just play back the specified sound file.
textSection | String holding the name of a section in the conversation text file. |
sound | String holding the name of the sound file (WAV, OGG, MP3) in the dubbing directory to play (optional). |
textScrollSpeed | float value specifying the speed at which the individual letters of the text will be diplayed (optional). |
textDisplayTime | float value specifying the amount of time (in seconds) the text will be shown once it is completely displayed (optional). |
void PawnLow::PlaySound | ( | string | filename | ) |
Play the WAV file filename once using the default audible range.
filename | String holding the name of the WAV file to play. The .wav extension must be included in the name. |
void PawnLow::PlaySound | ( | string | filename, |
float | distance | ||
) |
Play the WAV file filename once.
filename | String holding the name of the WAV file to play. The .wav extension must be included in the name. |
distance | Specifies the audible radius of the sound. |
void PawnLow::StartSoundTrack | ( | string | filename | ) |
Play the audio stream filename.
filename | String holding the name of the audio file (MP3, OGG, WAV) to stream. |
void PawnLow::StopAllAudioStreams | ( | ) |
Stop all audio streams.
void PawnLow::AttachCamera | ( | ) |
Attach the engine camera to the pawn.
void PawnLow::AttachCameraToBone | ( | string | boneName | ) |
Attach the engine camera to the specified bone of the pawn.
boneName | String holding the name of a bone present in the pawn. |
void PawnLow::AttachCameraToEntity | ( | string | szEntityName, |
string | boneName | ||
) |
Attach the engine camera to the specified bone of the specified entity.
szEntityName | String holding the name of the entity to attach the camera to. |
boneName | String holding the name of a bone present in the entity's actor. |
void PawnLow::DetachCamera | ( | ) |
Returns the camera control to the player.
void PawnLow::TiltCamera | ( | float | angle | ) |
Tilts the camera up or down.
A negative value tilts the camera up and a positive value tilts the camera down. The player camera must be in 1st person mode for this method to work.
angle | float value specifying the tilt angle in radians. |
void PawnLow::SwitchView | ( | int | viewMode | ) |
Switch to the specified view.
viewMode | Specifies the view mode (0 - 3) as described for the ViewSwitch entity. |
int PawnLow::GetScreenWidth | ( | ) |
Get the width of the screen.
int PawnLow::GetScreenHeight | ( | ) |
Get the height of the screen.
void PawnLow::SetCameraWindow | ( | float | fov | ) |
Set the field of view of the camera.
fov | Field of view in radians. |
void PawnLow::SetCameraWindow | ( | float | fov, |
bool | useWidthHeight, | ||
int | left, | ||
int | top, | ||
int | width_right, | ||
int | height_bottom | ||
) |
Set the field of view of the camera and the size of the camera viewport.
fov | Field of view in radians. |
useWidthHeight |
|
left | int value defining the left x-coordinate of the viewport. |
top | int value defining the upper y-coordinate of the viewport. |
width_right | int value defining the width or the right x-coordinate of the viewport. |
height_bottom | int value defining the height or the bottom y-coordinate of the viewport. |
void PawnLow::SetFixedCameraPosition | ( | float | x, |
float | y, | ||
float | z | ||
) |
Set the position of the currently active FixedCamera to (x, y, z).
x | float value specifying the x position. |
y | float value specifying the y position. |
z | float value specifying the z position. |
void PawnLow::SetFixedCameraRotation | ( | float | angleX, |
float | angleY, | ||
float | angleZ | ||
) |
Set the rotation of the currently active FixedCamera to (angleX, angleY, angleZ).
angleX | float value specifying the new rotation around the x-axis (in degrees). |
angleY | float value specifying the new rotation around the y-axis (in degrees). |
angleZ | float value specifying the new rotation around the z-axis (in degrees). |
void PawnLow::SetFixedCameraFOV | ( | float | fov | ) |
Set the field of view of the currently active FixedCamera.
fov | Field of view in radians. |
void PawnLow::MoveFixedCamera | ( | float | offsetX, |
float | offsetY, | ||
float | offsetZ | ||
) |
Move the currently active FixedCamera.
offsetX | float value specifying the distance to move in x-direction. |
offsetY | float value specifying the distance to move in y-direction. |
offsetZ | float value specifying the distance to move in z-direction. |
void PawnLow::RotateFixedCamera | ( | float | angleX, |
float | angleY, | ||
float | angleZ | ||
) |
Rotate the currently active FixedCamera.
angleX | float value specifying the angle to rotate around the x-axis (in degrees). |
angleY | float value specifying the angle to rotate around the y-axis (in degrees). |
angleZ | float value specifying the angle to rotate around the z-axis (in degrees). |
void PawnLow::SetGravity | ( | float | x, |
float | y, | ||
float | z | ||
) |
Set the gravitational force.
x | Specifies the x-component of the gravitational force. |
y | Specifies the y-component of the gravitational force. |
z | Specifies the z-component of the gravitational force. |
float PawnLow::GetGravityX | ( | ) |
Get the x-component of the gravity.
float PawnLow::GetGravityY | ( | ) |
Get the y-component of the gravity.
float PawnLow::GetGravityZ | ( | ) |
Get the z-component of the gravity.
void PawnLow::SetWind | ( | float | x, |
float | y, | ||
float | z | ||
) |
Set the wind force that influences particles.
x | Specifies the x-component of the wind. |
y | Specifies the y-component of the wind. |
z | Specifies the z-component of the wind. |
float PawnLow::GetWindX | ( | ) |
Get the x-component of the wind.
float PawnLow::GetWindY | ( | ) |
Get the y-component of the wind.
float PawnLow::GetWindZ | ( | ) |
Get the z-component of the wind.
void PawnLow::SetWindBase | ( | float | x, |
float | y, | ||
float | z | ||
) |
Set the constant part of the wind force that influences particles.
x | Specifies the x-component of the wind base. |
y | Specifies the y-component of the wind base. |
z | Specifies the z-component of the wind base. |
float PawnLow::GetWindBaseX | ( | ) |
Get the x-component of the wind base.
float PawnLow::GetWindBaseY | ( | ) |
Get the y-component of the wind base.
float PawnLow::GetWindBaseZ | ( | ) |
Get the z-component of the wind base.
void PawnLow::SetWindGenerator | ( | bool | enable | ) |
Enable/Disable the WindGenerator entity.
enable |
|
bool PawnLow::IsInLiquid | ( | ) |
Check if the pawn is inside a Liquid entity.
string PawnLow::GetLiquid | ( | ) |
Get the name of the Liquid entity the pawn is in.
""
) if the pawn is not inside a liquid. void PawnLow::ChangeMaterial | ( | string | section | ) |
Change the material on the pawn's actor according to the specified section of material.ini.
section | String holding the name of a section in the material.ini file. |
void PawnLow::ChangeWeaponMaterial | ( | string | section | ) |
Change the material on the pawn's weapon actor according to the specified section of material.ini.
section | String holding the name of a section in the material.ini file. |
bool PawnLow::SetWeaponMatFromFlip | ( | string | flipbook, |
int | actorMaterialIndex, | ||
int | flipbookImageIndex, | ||
int | r, | ||
int | g, | ||
int | b | ||
) |
Replace the pawn weapon's material with index actorMaterialIndex by the texture with index flipbookImageIndex of the specified FlipBook entity.
flipbook | String holding the name of a Flipbook entity. |
actorMaterialIndex | integer value specifying the index of the actor material to change. |
flipbookImageIndex | integer value specifying the index of the image to use. |
r | Specifies the red color value of the image. |
g | Specifies the green color value of the image. |
b | Specifies the blue color value of the image. |
void PawnLow::SetShadowFromFlip | ( | string | flipbook, |
string | szEntityName | ||
) |
Set the images of a FlipBook entity as shadow bitmap for the specified entity's actor.
flipbook | String holding the name of a Flipbook entity. |
szEntityName | String holding the name of the entity to set the shadow for. |
void PawnLow::DrawPolyShadow | ( | ) |
Draw a projected shadow beneath the pawn.
void PawnLow::AddExplosion | ( | string | explosion, |
string | boneName, | ||
float | offsetX, | ||
float | offsetY, | ||
float | offsetZ | ||
) |
Attach an explosion effect predefined in explosion.ini to the specified actor bone.
Offset the attachment point from the bone by the amounts in (offsetX, offsetY, offsetZ).
explosion | String holding the name of a section in the explosion.ini file. |
boneName | String holding the name of a bone present in the pawn. |
offsetX | float value specifying the offset in x-direction. |
offsetY | float value specifying the offset in y-direction. |
offsetZ | float value specifying the offset in z-direction. |
void PawnLow::DrawText | ( | string | text, |
int | x, | ||
int | y, | ||
string | font | ||
) |
Display the given text onto the screen using the specified font and position.
text | String holding the text to display. |
x | integer value defining the x-position to draw the text on the screen. |
y | integer value defining the y-position to draw the text on the screen. |
font | String specifying the font to use. |
void PawnLow::ShowText | ( | int | textID, |
string | szEntityName, | ||
string | animation, | ||
string | text, | ||
string | font, | ||
string | sound, | ||
int | x, | ||
int | y, | ||
string | align, | ||
float | alpha | ||
) |
Display the given text attached to an entity (Pawn, Attribute, StaticEntityProxy) or the player.
The text will move along with the entity keeping its relative position.
<CR>
can be used as a separator.textID | integer value used to identify this text object (0 - 19). |
szEntityName | String holding the name of the entity to attach the text to ("Player" to specify the player). Use an empty string ("" ) for absolute screen coordinates. |
animation | String holding the name of the animation the entity/player will play while the text is shown. If left empty ("" ) the previously active animation will continue. |
text | String holding the text to display. |
font | String specifying the font to use. |
sound | String holding the name of a WAV file to play once while the text is displayed. (not implemented) |
x | integer value defining the relative or absolute x-position to draw the text on the screen. |
y | integer value defining the relative or absolute y-position to draw the text on the screen. |
align | String defining the alignment of the text relative to the origin of the entity/player ("left" , "right" , "center" ). |
alpha | float value specifying the transparency of the text with 0 being fully transparent and 255 being fully opaque. |
void PawnLow::RemoveText | ( | int | textID | ) |
Remove the text object with the ID textID displayed by the ShowText or ShowTextDelay method.
textID | integer value used to identify a text object (0 - 19). |
void PawnLow::SetGamma | ( | float | gamma | ) |
Set the gamma value.
gamma | Specifies the new gamma value. |
float PawnLow::GetGamma | ( | ) |
Get the gamma value.
void PawnLow::FillScreenArea | ( | int | areaID, |
bool | keepVisible, | ||
float | alpha, | ||
float | r = 0.0 , |
||
float | g = 0.0 , |
||
float | b = 0.0 |
||
) |
Fill a rectangle on the screen with the given color and alpha.
areaID | integer value used to identify the area object (0 - 19). |
keepVisible |
|
alpha | float value specifying the transparency of the rectangle with 0 being fully transparent and 255 being fully opaque. |
r | Specifies the red color value of the rectangle. |
g | Specifies the green color value of the rectangle. |
b | Specifies the blue color value of the rectangle. |
void PawnLow::FillScreenArea | ( | int | areaID, |
bool | keepVisible, | ||
float | alpha, | ||
float | r, | ||
float | g, | ||
float | b, | ||
int | left, | ||
int | top, | ||
int | right, | ||
int | bottom | ||
) |
Fill a rectangle on the screen with the given color and alpha.
areaID | integer value used to identify the area object (0 - 19). |
keepVisible |
|
alpha | float value specifying the transparency of the rectangle with 0 being fully transparent and 255 being fully opaque. |
r | Specifies the red color value of the rectangle. |
g | Specifies the green color value of the rectangle. |
b | Specifies the blue color value of the rectangle. |
left | int value defining the left x-coordinate of the rectangle. |
top | int value defining the upper y-coordinate of the rectangle. |
right | int value defining the right x-coordinate of the rectangle. |
bottom | int value defining the the bottom y-coordinate of the rectangle. |
void PawnLow::RemoveScreenArea | ( | int | areaID | ) |
Remove the area with the ID areaID.
areaID | integer value used to identify the area object to hide (0 - 19). |
void PawnLow::ShowHudPicture | ( | int | pictureID, |
bool | show | ||
) |
Show or hide a HUD picture element (BMP, JPG, TGA, PNG or animated GIF).
pictureID | integer value used to identify the HUD picture to show or hide. |
show |
|
void PawnLow::ShowHudPicture | ( | int | pictureID, |
bool | show, | ||
string | szEntityName, | ||
int | x, | ||
int | y, | ||
float | time, | ||
int | left = 0 , |
||
int | top = 0 |
||
) |
Show or hide a HUD picture element (BMP, JPG, TGA, PNG or animated GIF).
pictureID | integer value used to identify the HUD picture to show or hide. |
show |
|
szEntityName | String holding the name of an entity to attach the picture to. Alternatively "Player" or "Camera" may be used. If left empty ("") absolute screen coordinates are used. |
x | integer value defining the relative or absolute x-position to draw the picture on the screen. |
y | integer value defining the relative or absolute y-position to draw the picture on the screen. |
time | time in seconds to display the picture. If 0 the picture is displayed for one frame. |
left | integer value to specify the left starting pixel of the HUD picture. |
top | integer value to specify the top starting pixel of the HUD picture. |
string PawnLow::MouseSelect | ( | bool | highlight, |
bool | selectablePlayer = false , |
||
float | fillColorR = 255.0 , |
||
float | fillColorG = 255.0 , |
||
float | fillColorB = 255.0 , |
||
float | ambientColorR = 255.0 , |
||
float | ambientColorG = 255.0 , |
||
float | ambientColorB = 255.0 |
||
) |
Get the szEntityName of an actor whose bounding box is below the cursor.
highlight |
|
selectablePlayer |
|
fillColorR | Specifies the red color value of the highlighted actor. |
fillColorG | Specifies the green color value of the highlighted actor. |
fillColorB | Specifies the blue color value of the highlighted actor. |
ambientColorR | Specifies the red ambient color value of the highlighted actor. |
ambientColorG | Specifies the green ambient color value of the highlighted actor. |
ambientColorB | Specifies the blue ambient color value of the highlighted actor. |
void PawnLow::MouseControlledPlayer | ( | bool | flag | ) |
Define whether the player can be controlled with the mouse or not.
flag |
|
void PawnLow::ShowMouse | ( | bool | show | ) |
Show or hide the mouse cursor.
show |
|
int PawnLow::GetMousePosX | ( | ) |
Get the x-position of the mouse cursor.
int PawnLow::GetMousePosY | ( | ) |
Get the y-position of the mouse cursor.
void PawnLow::SetMousePos | ( | int | x, |
int | y | ||
) |
Set the mouse cursor to the specified position.
x | Specifies the new x-position of the mouse cursor. |
y | Specifies the new y-position of the mouse cursor. |
bool PawnLow::IsButtonDown | ( | int | joystickID, |
int | buttonID | ||
) |
Get the state of the button with the ID buttonID of the specified joystick.
joystickID | integer value used to identify the joystick (0 - 3). |
buttonID | integer value used to identify the button. |
int PawnLow::GetJoyAxisX | ( | int | joystickID | ) |
Get the left-right movement of the specified joystick.
joystickID | integer value used to identify the joystick (0 - 3). |
int PawnLow::GetJoyAxisY | ( | int | joystickID | ) |
Get the forward-backward movement of the specified joystick.
joystickID | integer value used to identify the joystick (0 - 3). |
int PawnLow::GetJoyAxisZ | ( | int | joystickID | ) |
Checks z-axis (often the throttle control) of the specified joystick.
If the joystick does not have this axis, the value is 0.
joystickID | integer value used to identify the joystick (0 - 3). |
int PawnLow::GetNumJoysticks | ( | ) |
Get the number of joysticks connected to the system.
bool PawnLow::IsEntityVsible | ( | string | szEntityName | ) |
Check if the specified entity is visible.
szEntityName | String holding the name of the entity to check. |
void PawnLow::SetEntityLighting | ( | string | szEntityName, |
float | fillColorR, | ||
float | fillColorG, | ||
float | fillColorB, | ||
float | ambientColorR, | ||
float | ambientColorG, | ||
float | ambientColorB | ||
) |
Set the FillColor and AmbientColor of the specified entity.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity to change. |
fillColorR | Specifies the new red color value of the entity's actor. |
fillColorG | Specifies the new green color value of the entity's actor. |
fillColorB | Specifies the new blue color value of the entity's actor. |
ambientColorR | Specifies the new red ambient color value of the entity's actor. |
ambientColorG | Specifies the new green ambient color value of the entity's actor. |
ambientColorB | Specifies the new blue ambient color value of the entity's actor. |
void PawnLow::SetEntityAlpha | ( | string | szEntityName, |
float | alpha | ||
) |
Set the transparency of the specified entity.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity to change. |
alpha | float value specifying the transparency of the actor with 0 being fully transparent and 255 being fully opaque. |
float PawnLow::GetEntityAlpha | ( | string | szEntityName | ) |
Get the transparency of the specified entity.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity of which to get the alpha value. |
void PawnLow::SetEntityScale | ( | string | szEntityName, |
float | scale | ||
) |
Set the scale of the entity's actor to the scale.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity to scale. |
scale | float value specifying the scale of the actor in x, y and z direction. |
void PawnLow::SetEntityScale | ( | string | szEntityName, |
float | scaleX, | ||
float | scaleY, | ||
float | scaleZ | ||
) |
Set the scale of the entity's actor to the given values.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity to scale. |
scaleX | float value specifying the scale of the actor in x direction. |
scaleY | float value specifying the scale of the actor in y direction. |
scaleZ | float value specifying the scale of the actor in z direction. |
void PawnLow::SetEntityPosition | ( | string | szEntityName, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Set the position of the specified entity.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity to position. |
x | float value specifying the x position. |
y | float value specifying the y position. |
z | float value specifying the z position. |
void PawnLow::SetEntityRotation | ( | string | szEntityName, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Set the rotation of the specified entity to (x, y, z).
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity to rotate. |
x | float value specifying the x rotation (in degrees). |
y | float value specifying the y rotation (in degrees). |
z | float value specifying the z rotation (in degrees). |
void PawnLow::MoveEntity | ( | string | szEntityName, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Move the specified entity.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity to move. |
x | float value specifying the amount to move in x direction. |
y | float value specifying the amount to move in y direction. |
z | float value specifying the amount to move in z direction. |
void PawnLow::RotateEntity | ( | string | szEntityName, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Rotate the specified entity.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity to rotate. |
x | float value specifying the amount to rotate around the x axis (in degrees). |
y | float value specifying the amount to rotate around the y axis (in degrees). |
z | float value specifying the amount to rotate around the z axis (in degrees). |
float PawnLow::GetEntityX | ( | string | szEntityName | ) |
Get the x-position of the specified entity.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity. |
float PawnLow::GetEntityY | ( | string | szEntityName | ) |
Get the y-position of the specified entity.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity. |
float PawnLow::GetEntityZ | ( | string | szEntityName | ) |
Get the z-position of the specified entity.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity. |
float PawnLow::GetEntityYaw | ( | string | szEntityName | ) |
Get the yaw of the specified entity.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
).
szEntityName | String holding the name of the entity. |
int PawnLow::GetEntityScreenX | ( | string | szEntityName | ) |
Get the x-coordinate of the specified entity on the screen.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
). An empty string (""
) may be used for the calling pawn.
szEntityName | String holding the name of the entity. |
int PawnLow::GetEntityScreenY | ( | string | szEntityName | ) |
Get the y-coordinate of the specified entity on the screen.
szEntityName may specify a Pawn, a StaticEntityProxy, an Attribute or the player ("Player"
). An empty string (""
) may be used for the calling pawn.
szEntityName | String holding the name of the entity. |
float PawnLow::GetBoneX | ( | string | szEntityName, |
string | boneName | ||
) |
Get the x-coordinate of the specified bone for the given entity.
szEntityName | String holding the name of the entity owning the bone. |
boneName | String holding the name of a bone present in the specified entity. |
float PawnLow::GetBoneY | ( | string | szEntityName, |
string | boneName | ||
) |
Get the y-coordinate of the specified bone for the given entity.
szEntityName | String holding the name of the entity owning the bone. |
boneName | String holding the name of a bone present in the specified entity. |
float PawnLow::GetBoneZ | ( | string | szEntityName, |
string | boneName | ||
) |
Get the z-coordinate of the specified bone for the given entity.
szEntityName | String holding the name of the entity owning the bone. |
boneName | String holding the name of a bone present in the specified entity. |
float PawnLow::GetBoneYaw | ( | string | szEntityName, |
string | boneName | ||
) |
Get the yaw of the specified bone for the given entity.
szEntityName | String holding the name of the entity owning the bone. |
boneName | String holding the name of a bone present in the specified entity. |
float PawnLow::GetBoneToBone | ( | string | boneName, |
string | targetEntityName, | ||
string | targetBoneName | ||
) |
Get the distance between the pawn's bone and the specified target's bone.
boneName | String holding the name of a bone present in the pawn. |
targetEntityName | String holding the name of the entity owning the target bone. |
targetBoneName | String holding the name of a bone present in the target entity. |
string PawnLow::GetLastBoneHit | ( | ) |
Get the name of the bone last hit in this pawn.
int PawnLow::GetStringLength | ( | string | text | ) |
Get the length of the given string.
text | String to get the length of. |
string PawnLow::StringCopy | ( | string | text | ) |
Transfer the contents of the given string variable into another string variable.
text | String to copy. |
string PawnLow::LeftCopy | ( | string | text, |
int | numChars | ||
) |
Get the first numChars characters from the given string.
text | String to copy. |
numChars | Specifies the number of characters to copy. |
string PawnLow::RightCopy | ( | string | text, |
int | numChars | ||
) |
Get the last numChars characters from the given string.
text | String to copy. |
numChars | Specifies the number of characters to copy. |
void PawnLow::debug | ( | int | variable | ) |
Output the contents of variable to the console window for this pawn, assuming the console is active.
Used to debug scripts that are not working correctly.
variable | Specifies any variable from the script and can be of any type (i.e. string, float, int or bool). |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void PawnLow::HighLevel | ( | string | order | ) |
Return to executing the script as high level methods at the next frame.
order | String holding the name of the high level order that will be executed next. |
void PawnLow::EndScript | ( | ) |
Stop the execution of the script (without removing the pawn's actor).
void PawnLow::SetHudDraw | ( | bool | show | ) |
Show or hide the HUD.
show |
|
bool PawnLow::GetHudDraw | ( | ) |
Get the Hud drawing state.
void PawnLow::ActivateHudElement | ( | string | attribute, |
bool | activate | ||
) |
Activate or deactivate the HUD element representing the specified attribute.
attribute | String holding the name of the attribute whose HUD element to activate/deactivate. |
activate |
|
int PawnLow::GetCurFlipBook | ( | string | flipbook | ) |
Get the index of the current image of the specified FlipBook entity.
flipbook | String holding the name of the FlipBook entity to check. |
string PawnLow::GetGroundTexture | ( | ) |
Get the name of the texture beneath the pawn.
string PawnLow::GetPlayerGroundTexture | ( | ) |
Get the name of the texture beneath the player.
void PawnLow::SetUseItem | ( | string | item | ) |
Set the specified item to be the current Use Item.
item | String holding the name of the item to set as Use Item. |
void PawnLow::ClearUseItem | ( | string | item | ) |
Remove the specified Use Item.
item | String holding the name of the Use Item to remove. |
void PawnLow::SetKeyPause | ( | bool | pause | ) |
Pause or restore the keyboard control.
pause |
|
bool PawnLow::IsKeyDown | ( | int | key | ) |
Check if the specified key is pressed.
key | integer value specifying the key to check. |
string PawnLow::TraceToActor | ( | string | boneName, |
float | offsetX, | ||
float | offsetY, | ||
float | offsetZ | ||
) |
Trace a line from the specified bone to a point defined by a specified offset and return the szEntityName of any pawn actor that it intersects.
boneName | Specifies the name of a bone present in the pawn. |
offsetX | Specifies the offset in x-direction relative to the direction the pawn is facing. |
offsetY | Specifies the offset in y-direction relative to the direction the pawn is facing. |
offsetZ | Specifies the offset in z-direction relative to the direction the pawn is facing. |
int PawnLow::WhereIsPlayer | ( | ) |
Get the direction to the player.
int PawnLow::WhereIsEntity | ( | string | szEntityName | ) |
Get the direction to the specified entity.
szEntityName | String holding the name of the entity to check. |
int PawnLow::random | ( | int | lower, |
int | upper | ||
) |
Generate a random integer number in the range lower to upper.
lower | Specifies the lower limit of the random number. |
upper | Specifies the upper limit of the random number. |
int PawnLow::Integer | ( | float | value | ) |
Get the integer portion of the given value.
value | float value that is to be converted to an integer. |
float PawnLow::sin | ( | float | value | ) |
Get the sine of the given value.
value | float value to calculate the sine of (in radians). |
float PawnLow::cos | ( | float | value | ) |
Get the cosine of the given value.
value | float value to calculate the cosine of (in radians). |
float PawnLow::tan | ( | float | value | ) |
Get the tangent of the given value.
value | float value to calculate the tangent of (in radians). |
float PawnLow::asin | ( | float | value | ) |
Get the arc sine of the given value.
value | float value to calculate the arc sine of. |
float PawnLow::acos | ( | float | value | ) |
Get the arc cosine of the given value.
value | float value to calculate the arc cosine of. |
float PawnLow::atan | ( | float | value | ) |
Get the arc tangent of the given value.
value | float value to calculate the arc tangent of. |