Public Member Functions
PawnLow Class Reference

All methods to control a pawn in low level mode. More...

List of all members.

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.

Detailed Description

All methods to control a pawn in low level mode.


Member Function Documentation

void PawnLow::PlayerRender ( bool  flag)

Controls the rendering and collision detection of the player actor.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Player.Render instead.
Parameters:
flag
  • true to make the player actor visible and enable collision detection.
  • false to hide the player actor and stop collision detection.
Returns:
Nothing.
void PawnLow::PawnRender ( bool  flag)

Controls the rendering and collision detection of the pawn actor.

Also affects any attached weapon actors.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Render instead.
Parameters:
flag
  • true to make the pawn actor visible and enable collision detection.
  • false to hide the pawn actor and stop collision detection.
Returns:
Nothing.
void PawnLow::Render ( bool  flag)

Controls the rendering and collision detection of the pawn actor.

Also affects any attached weapon actors.

Parameters:
flag
  • true to make the pawn actor visible and enable collision detection.
  • false to hide the pawn actor and stop collision detection.
Returns:
Nothing.
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.

Parameters:
angleField of view in degrees.
boneNameString holding the name of a bone present in the pawn's actor, or empty to use the root bone.
Returns:
Nothing.
void PawnLow::StepHeight ( float  distance)

Set the step height of the pawn to distance.

Parameters:
distanceSpecifies the maximum step height. If less than or equal to zero then step up is disabled for this pawn.
Returns:
Nothing.
void PawnLow::Gravity ( bool  state)

Set whether the pawn will be affected by gravity.

Parameters:
state
  • true then the actor is subject to gravity (default condition).
  • false then the actor is unaffected by gravity.
Returns:
Nothing.
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.

Parameters:
animationString holding the name of an animation present in the pawn's actor.
widthif larger than zero, use this value for the width and depth of the bounding box.
Returns:
Nothing.
void PawnLow::SetCollision ( )

Set the actor's bounding box so collisions will occur with other objects.

Returns:
Nothing.
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.

Returns:
Nothing.
void PawnLow::SetAlpha ( float  alpha)

Set the transparency of the pawn's actor.

Parameters:
alphafloat value specifying the transparency of the actor with 0.0 being fully transparent and 255.0 being fully opaque.
Returns:
Nothing.
float PawnLow::GetAlpha ( )

Get the transparency of the pawn's actor.

Returns:
float value specifying the transparency of the actor with 0.0 being fully transparent and 255.0 being fully opaque.
void PawnLow::SetScale ( float  scale)

Set the scale of the pawn's actor to scale.

Parameters:
scalefloat value specifying the scale of the actor in x, y and z direction.
Returns:
Nothing.
void PawnLow::SetScale ( float  scaleX,
float  scaleY,
float  scaleZ 
)

Set the scale of the pawn's actor to the given values.

Parameters:
scaleXfloat value specifying the scale of the actor in x direction.
scaleYfloat value specifying the scale of the actor in y direction.
scaleZfloat value specifying the scale of the actor in z direction.
Returns:
Nothing.
void PawnLow::SetPosition ( string  szEntityName,
float  x,
float  y,
float  z 
)

Move the actor of the entity named szEntityName to the specified position.

Parameters:
szEntityNameString holding the name of the entity to move.
xfloat value specifying the x position.
yfloat value specifying the y position.
zfloat value specifying the z position.
Returns:
Nothing.
void PawnLow::PositionToPlatform ( string  movingPlatform,
float  offsetX,
float  offsetY,
float  offsetZ,
bool  rotate 
)

Position the pawn to the MovingPlatform entity named movingPlatform.

Parameters:
movingPlatformString holding the name of a MovingPlatform entity.
offsetXfloat value specifying the offset in x direction from the platform's origin.
offsetYfloat value specifying the offset in y direction from the platform's origin.
offsetZfloat value specifying the offset in z direction from the platform's origin.
rotateboolean value that determines whether or not the pawn will match the rotation of the platform's model.
Returns:
Nothing.
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.

Parameters:
offsetXfloat value specifying the offset in x direction from the player's position.
offsetYfloat value specifying the offset in y direction from the player's position.
offsetZfloat value specifying the offset in z direction from the player's position.
playerAxes
  • true to apply the offsets along the player's left, up and in vectors.
  • false to apply the offsets along the world's main axes.
rotateboolean value that determines whether or not the pawn will match the rotation of the player.
Returns:
Nothing.
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.

Parameters:
offsetXfloat value specifying the offset in x direction from the pawn's position.
offsetYfloat value specifying the offset in y direction from the pawn's position.
offsetZfloat value specifying the offset in z direction from the pawn's position.
pawnAxes
  • true to apply the offsets along the pawn's left, up and in vectors.
  • false to apply the offsets along the world's main axes.
rotateboolean value that determines whether or not the player will match the rotation of the pawn.
Returns:
Nothing.
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.

Parameters:
pawnNameString holding the name of a pawn entity.
offsetXfloat value specifying the offset in x direction from the position of the pawn pawnName.
offsetYfloat value specifying the offset in y direction from the position of the pawn pawnName.
offsetZfloat value specifying the offset in z direction from the position of the pawn pawnName.
pawnAxes
  • true to apply the offsets along the left, up and in vectors of the pawn pawnName.
  • false to apply the offsets along the world's main axes.
rotateboolean value that determines whether or not the pawn will match the rotation of the pawn pawnName.
Returns:
Nothing.
void PawnLow::PositionToBone ( string  szEntityName,
string  boneName 
)

Position the pawn's actor to the bone boneName of the actor of the entity szEntityName.

Parameters:
szEntityNameString holding the name of the entity.
boneNameString holding the name of a bone present in the actor of the entity szEntityName.
Returns:
Nothing.
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.

Parameters:
pointNameString holding the name of a ScriptPoint entity.
offsetXfloat value specifying the offset in x direction from the position of the ScriptPoint pointName.
offsetYfloat value specifying the offset in y direction from the position of the ScriptPoint pointName.
offsetZfloat value specifying the offset in z direction from the position of the ScriptPoint pointName.
rotateboolean value that determines whether or not the entity will match the SriptPoint angles after teleport.
szEntityNameString holding the name of the entity to teleport.
Returns:
Nothing.
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.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use TeleportToPoint instead.
Parameters:
szEntityNameString holding the name of the entity to teleport.
pointNameString holding the name of a ScriptPoint entity.
offsetXfloat value specifying the offset in x direction from the position of the ScriptPoint pointName.
offsetYfloat value specifying the offset in y direction from the position of the ScriptPoint pointName.
offsetZfloat value specifying the offset in z direction from the position of the ScriptPoint pointName.
rotateboolean value that determines whether or not the entity will match the SriptPoint angles after teleport.
Returns:
Nothing.
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.

Parameters:
yawfloat value specifying the rotation (radians) around the y-axis.
speedfloat value specifying the speed (texels/second) at which the pawn will be moved forward.
distancefloat value specifying the distance (texels) to keep away from walls.
Returns:
  • true if the move was successful.
  • false if the pawn could not be moved.
bool PawnLow::walkmove ( float  yaw,
float  speed 
)

Move the pawn at a speed of speed texels per second in the direction specified by yaw.

Parameters:
yawfloat value specifying the rotation (radians) around the y-axis.
speedfloat value specifying the speed (texels/second) at which the pawn will be moved forward.
Returns:
  • true if the move was successful.
  • false if the pawn could not be moved.
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.

Parameters:
pitchfloat value specifying the rotation (radians) around the x-axis.
yawfloat value specifying the rotation (radians) around the y-axis.
speedfloat value specifying the speed (texels/second) at which the pawn will be moved forward.
Returns:
  • true if the move was successful.
  • false if the pawn could not be moved.
void PawnLow::LookAtPawn ( string  szEntityName,
float  offsetY 
)

Rotate the pawn to face the actor of the specified entity.

Parameters:
szEntityNameString holding the name of the entity.
offsetYfloat value specifying the offset from the root bone of the target actor in y direction.
Returns:
Nothing.
void PawnLow::MatchPlayerAngles ( )

Rotate the pawn's actor to match the player's rotation.

Returns:
Nothing.
void PawnLow::MatchEntityAngles ( string  szEntityName)

Rotate the pawn's actor to match the angles of the specified entity.

Parameters:
szEntityNameString holding the name of the entity.
Returns:
Nothing.
void PawnLow::PlayerMatchAngles ( string  szEntityName)

Sets the player to match the rotation angles of the specified entity.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Player.MatchEntityAngles instead.
Parameters:
szEntityNameString holding the name of the entity.
Returns:
Nothing.
void PawnLow::FacePoint ( )

Immediately turns the pawn to face the current ScriptPoint.

Returns:
Nothing.
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.

Returns:
Nothing.
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.

Returns:
Nothing.
float PawnLow::ConvertDegrees ( float  degrees)

Converts an angle specified in degrees into radians.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Math.deg2rad instead.
Parameters:
degreesSpecifies the angle in degrees to convert into radians.
Returns:
float value corresponding to the angle in radians, i.e. degrees * 0.0174532925199433.
void PawnLow::ForceUp ( float  amount)

Apply an upward force of amount to the pawn's actor.

Used to make the pawn jump.

Parameters:
amountSpecifies the amount of force.
Returns:
Nothing.
void PawnLow::ForceDown ( float  amount)

Apply a downward force of amount to the pawn's actor.

Parameters:
amountSpecifies the amount of force.
Returns:
Nothing.
void PawnLow::ForceRight ( float  amount)

Apply a force to the right of amount to the pawn's actor.

Parameters:
amountSpecifies the amount of force.
Returns:
Nothing.
void PawnLow::ForceLeft ( float  amount)

Apply a force to the left of amount to the pawn's actor.

Parameters:
amountSpecifies the amount of force.
Returns:
Nothing.
void PawnLow::ForceForward ( float  amount)

Apply a forward force of amount to the pawn's actor.

Parameters:
amountSpecifies the amount of force.
Returns:
Nothing.
void PawnLow::ForceBackward ( float  amount)

Apply a backward force of amount to the pawn's actor.

Parameters:
amountSpecifies the amount of force.
Returns:
Nothing.
void PawnLow::ForceEntityUp ( float  amount,
string  szEntityName 
)

Apply an upward force of amount to the entity's actor.

Used to make the entity jump.

Parameters:
amountSpecifies the amount of force.
szEntityNameString holding the name of the entity.
Returns:
Nothing.
void PawnLow::ForceEntityDown ( float  amount,
string  szEntityName 
)

Apply a downward force of amount to the entity's actor.

Parameters:
amountSpecifies the amount of force.
szEntityNameString holding the name of the entity.
Returns:
Nothing.
void PawnLow::ForceEntityRight ( float  amount,
string  szEntityName 
)

Apply a force to the right of amount to the entity's actor.

Parameters:
amountSpecifies the amount of force.
szEntityNameString holding the name of the entity.
Returns:
Nothing.
void PawnLow::ForceEntityLeft ( float  amount,
string  szEntityName 
)

Apply a force to the left of amount to the entity's actor.

Parameters:
amountSpecifies the amount of force.
szEntityNameString holding the name of the entity.
Returns:
Nothing.
void PawnLow::ForceEntityForward ( float  amount,
string  szEntityName 
)

Apply a forward force of amount to the entity's actor.

Parameters:
amountSpecifies the amount of force.
szEntityNameString holding the name of the entity.
Returns:
Nothing.
void PawnLow::ForceEntityBackward ( float  amount,
string  szEntityName 
)

Apply a backward force of amount to the entity's actor.

Parameters:
amountSpecifies the amount of force.
szEntityNameString holding the name of the entity.
Returns:
Nothing.
void PawnLow::Animate ( string  animation)

Set the current animation of the pawn's actor to animation.

Parameters:
animationString holding the name of the animation.
Returns:
Nothing.
void PawnLow::AnimateEntity ( string  animation,
string  szEntityName,
bool  holdAtEnd 
)

Set the animation for the specified entity.

Parameters:
animationString holding the name of the animation.
szEntityNameString holding the name of the entity.
holdAtEndboolean value that determines whether or not to hold the animation at the end.
Returns:
Nothing.
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.

Parameters:
animationString holding the name of the animation.
boneNameString holding the name of a bone present in the pawn's actor.
Returns:
Nothing.
void PawnLow::AnimateHold ( string  animation)

This is the same as the Animate method except it will hold the animation at the last frame.

Parameters:
animationString holding the name of the animation.
Returns:
Nothing.
void PawnLow::AnimateTarget ( string  animation,
bool  holdAtEnd 
)

This is similar to AnimateEntity but animates the targeted pawn.

Parameters:
animationString holding the name of the animation.
holdAtEndboolean value that determines whether or not to hold the animation at the end.
Returns:
Nothing.
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.

Parameters:
animationString holding the name of the animation to blend to.
timefloat value that determines the duration of the blending.
Returns:
Nothing.
void PawnLow::AnimationSpeed ( float  speed)

Change the playback speed of the pawn's animation by multiplying it by speed (same as High Level method).

Parameters:
speedSpecifies the multiplication factor for the playback speed of the animation.
Returns:
Nothing.
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.

Parameters:
holdAtEndboolean value that determines whether or not to hold the animation at the end.
Returns:
Nothing.
void PawnLow::LoadAnimation ( string  motionFile)

Load a new animation from the motion file motionFile and add it to the pawn.

Parameters:
motionFileString holding the name of a valid motion file.
Returns:
Nothing.
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.

Parameters:
motionNameString holding the name of a valid motion.
eventDataString holding arbitrary data. Typically this is used to store the name of a WAV file.
keyTimefloat value that determines the time key of the event.
Returns:
  • true if the event has been inserted successfully.
  • false if an error has occured.
string PawnLow::CheckForEvent ( )

Check if any event has occurred for the current motion of the pawn.

Returns:
  • the event data string if an event has occured.
  • false if no event has occured.
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.

Parameters:
szEntityNameString holding the name of the entity whose actor is to be checked.
volumeSpecifies the volume of the sound to be played.
Returns:
Nothing.
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.

Parameters:
triggerString holding the name of the Trigger entity to activate.
Returns:
Nothing.
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.

Note:
Event triggers are shared among all pawns; not to be confused with a Trigger entity!
Parameters:
eventString holding the name of an event trigger.
stateboolean value specifying the new state of the event trigger.
Returns:
Nothing.
bool PawnLow::GetEventState ( string  event)

Return the state of the event trigger named event.

Note:
Event triggers are shared among all pawns; not to be confused with a Trigger entity!
Parameters:
eventString holding the name of the event trigger.
Returns:
boolean value reflecting the state of the specified event trigger.
void PawnLow::SetFlag ( int  flagID,
bool  state 
)

Set the state of the pawn flag flagID to state.

Note:
Pawn flags are shared among all pawns.
Parameters:
flagIDinteger value (0 - 499) identifying the pawn flag to be set.
stateboolean value specifying the new state of the pawn flag.
Returns:
Nothing.
bool PawnLow::GetFlag ( int  flagID)

Get the state of the pawn flag flagID.

Note:
Pawn flags are shared among all pawns.
Parameters:
flagIDinteger value (0 - 499) identifying the pawn flag.
Returns:
boolean value reflecting the state of the specified 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)

Returns:
Nothing.
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)

Parameters:
pointNameString holding the name of the new ScriptPoint.
Returns:
Nothing.
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).

Parameters:
minDistanceSpecifies the minimum range to search for a ScriptPoint.
maxDistanceSpecifies the maximum range to search for a ScriptPoint.
Returns:
  • true if a ScriptPoint was found.
  • false if no ScriptPoint was found.
bool PawnLow::FastPointCheck ( float  distance)

Check if the current valid ScriptPoint is within the specified range.

Parameters:
distanceSpecifies the range to check for the current ScriptPoint.
Returns:
  • true if the current valid ScriptPoint is within the specified range.
  • false if the current valid ScriptPoint is not within the specified range.
void PawnLow::SetTargetPoint ( float  x,
float  y,
float  z,
bool  offset = true 
)

Sets the specified point in space as the current target point.

Parameters:
xfloat value specifying the x position.
yfloat value specifying the y position.
zfloat value specifying the z position.
offset
  • true to define the target point by an offset in relation to the direction of the pawn's actor.
  • false to define an absolute position in space.
Returns:
Nothing.
float PawnLow::GetPointYaw ( string  pointName)

Get the yaw of the ScriptPoint named pointName.

Parameters:
pointNameString holding the name of a ScriptPoint entity.
Returns:
the y-rotation of the specified point in degrees.
float PawnLow::GetPitchToPoint ( )

Get the pitch between the pawn and the current ScriptPoint.

Returns:
angle between the pawn and ScriptPoint orientation around the x-axis.
float PawnLow::GetYawToPoint ( )

Get the yaw between the pawn and the current ScriptPoint.

Returns:
angle between the pawn and the ScriptPoint orientation around the y-axis.
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.

Parameters:
pointNameString holding the name of the ScriptPoint entity to be updated.
szEntityNameString holding the name of an entity to move the ScriptPoint to.
offsetXfloat value specifying the offset in x-direction.
offsetYfloat value specifying the offset in y-direction.
offsetZfloat value specifying the offset in z-direction.
angleXfloat value specifying the new rotation around the x-axis.
angleYfloat value specifying the new rotation around the y-axis.
angleZfloat value specifying the new rotation around the z-axis.
Returns:
Nothing.
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.

Parameters:
boneNameString holding the name of a bone present in the pawn's actor.
offsetXfloat value specifying the offset in x-direction.
offsetYfloat value specifying the offset in y-direction.
offsetZfloat value specifying the offset in z-direction.
Returns:
the distance between the current position and the impact point.
bool PawnLow::FastDistance ( string  szEntityName,
float  distance 
)

Check if the entity named szEntityName is within the specified range.

Parameters:
szEntityNameString holding the name of the entity to search for.
distancefloat value specifying the range to check for the given entity.
Returns:
  • true if the given entity is within the specified range.
  • false if the given entity is not within the specified range.
float PawnLow::GetDistanceTo ( string  szEntityName)

Get the distance to the specified entity.

Parameters:
szEntityNameString holding the name of the entity to get the distance to.
Returns:
the distance to the specified entity.
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.

Parameters:
fromEntityNameString holding the name of the first entity.
toEntityNameString holding the name of the second entity.
ignoreY
  • true to ignore the distance in y-direction.
  • false to include the distance in y-direction.
Returns:
the distance between two entities.
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.

Note:
Distance measurements are made 3D except for distance measurements to the mouse. Then the player/Pawn position is first projected and translated into screen coordinates. This method can be used to detect if your player, pawn, camera or mouse is leaving the screen, or walking too far away (in the depth), or if a Pawn is located between 2 distances. As an action you could for example move the camera to follow the Pawn/player etc.
Parameters:
fromEntityNameString 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.
toEntityNameString 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.
distanceModeboolean value defining whether minDistance/maxDistance are interpreted as the 3D depth (Distance) or the screen height (Screen Y).
  • true to use minScreenX and maxScreenX + min and max 3D depth.
  • false to use minScreenX and maxScreenX + min and max screen height (no depth distance, just a rectangle on the screen)
minScreenXfloat value defining the left x-coordinate (in screen space) of the area to check.
maxScreenXfloat value defining the right x-coordinate (in screen space) of the area to check.
minDistanceIf 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.
maxDistancefloat value.
ignoreX
  • true to ignore the distance in x-direction.
  • false to include the distance in x-direction.
ignoreY
  • true to ignore the distance in y-direction.
  • false to include the distance in y-direction.
ignoreZ
  • true to ignore the distance in z-direction.
  • false to include the distance in z-direction.
Returns:
  • true if the entity named fromEntityName is within the specified area.
  • false if the entity named fromEntityName is outside the specified area.
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").

Parameters:
attributeString holding the name of the attribute to change.
amountinteger value determining the new value of the specified attribute.
szEntityNameString holding the name of the entity owning the attribute.
Returns:
Nothing.
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").

Parameters:
attributeString holding the name of the attribute.
szEntityNameString holding the name of the entity owning the attribute.
Returns:
value of the specified 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").

Parameters:
attributeString holding the name of the attribute to change.
amountinteger value determining the amount the specified attribute will be modified by.
szEntityNameString holding the name of the entity owning the attribute.
Returns:
Nothing.
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").

Parameters:
attributeString holding the name of the attribute to create.
szEntityNameString holding the name of the entity owning the attribute.
Returns:
Nothing.
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").

Parameters:
attributeString holding the name of the attribute to create.
lowinteger value determining the low value limit of the new attribute.
highinteger value determining the high value limit of the new attribute.
szEntityNameString holding the name of the entity owning the attribute.
Returns:
Nothing.
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").

Parameters:
attributeString holding the name of the attribute to modify.
lowinteger value determining the new low value limit of the attribute.
highinteger value determining the new high value limit of the attribute.
szEntityNameString holding the name of the entity owning the attribute.
Returns:
Nothing.
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").

Parameters:
attributeString holding the name of the attribute to modify.
amountinteger value determining the amount by which to increase the high value limit of the attribute.
setMaxAmount
  • true to set the attribute to its new high value limit.
  • false to leave the attribute at its current value.
szEntityNameString holding the name of the entity owning the attribute.
Returns:
Nothing.
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").

Parameters:
attributeString holding the name of the attribute to check.
szEntityNameString holding the name of the entity owning the attribute.
Returns:
the power up level of the specified attribute.
void PawnLow::SaveAttributes ( string  filename)

Saves the current player attributes to a text file of the specified name.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Player.SaveAttributes instead.
Parameters:
filenameString holding the name of the file to write to.
Returns:
Nothing.
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.

Parameters:
attributeString holding the name of the target's attribute to check.
Returns:
  • 0 if the target actor has been removed from the level.
  • 1 if the target doesn't have the specified attribute.
  • 2 if the value of the specified attribute is equal to or less than 0.
  • 3 otherwise.
void PawnLow::UpdateEnemyVis ( )

Update the position of the current enemy regardless if it can be seen or not.

Returns:
Nothing.
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.

Returns:
Nothing.
void PawnLow::SetTarget ( string  szEntiyName)

Set the specified entity to be the current target.

Parameters:
szEntiyNameString holding the name of the entity to target.
Returns:
Nothing.
void PawnLow::TargetPlayer ( )

Set the player as the current target.

Returns:
Nothing.
void PawnLow::SetPlayerWeapon ( int  weaponSlot)

Set the player's weapon to the slot number specified.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Player.SetWeapon instead.
Parameters:
weaponSlotinteger value specifying the weapon slot number (0 - 39).
Returns:
Nothing.
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.

Parameters:
projectileString holding the name of the projectile type to fire.
boneNameString holding the name of a bone in the pawn (or the pawn's weapon actor if present) acting as launch location.
offsetXSpecifies the offset in x-direction (left) from the bone's orientation.
offsetYSpecifies the offset in y-direction (up) from the bone's orientation.
offsetZSpecifies the offset in z-direction (in) from the bone's orientation.
attributeString holding the name of the attribute to damage.
amountfloat value (0.0 - 1.0) specifying the percentage of the target actor's height to aim at.
Returns:
Nothing.
void PawnLow::FireProjectileBlind ( string  projectile,
string  boneName,
float  offsetX,
float  offsetY,
float  offsetZ,
string  attribute 
)

Fires a projectile without aiming at a target.

Parameters:
projectileString holding the name of the projectile type to fire.
boneNameString holding the name of a bone in the pawn (or the pawn's weapon actor if present) acting as launch location.
offsetXSpecifies the offset in x-direction (left) from the bone's orientation.
offsetYSpecifies the offset in y-direction (up) from the bone's orientation.
offsetZSpecifies the offset in z-direction (in) from the bone's orientation.
attributeString holding the name of the attribute to damage.
Returns:
Nothing.
void PawnLow::Damage ( float  amount,
string  attribute 
)

Decrease the specified attribute of the pawn's target actor by amount.

Parameters:
amountSpecifies the amount the given attribute will be decreased.
attributeString holding the name of the attribute to decrease.
Returns:
Nothing.
void PawnLow::DamagePlayer ( float  amount,
string  attribute 
)

Decrease the specified attribute of the player by amount.

Parameters:
amountSpecifies the amount the given attribute will be decreased.
attributeString holding the name of the attribute to decrease.
Returns:
Nothing.
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'.

Parameters:
amountSpecifies the amount the given attribute will be decreased.
attributeString holding the name of the attribute to decrease.
szEntityNameString holding the name of the entity owning the attribute.
Returns:
Nothing.
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.

Parameters:
amountSpecifies the amount the given attribute will be decreased.
rangeSpecifies the range of the effect.
attributeString holding the name of the attribute to decrease.
Returns:
Nothing.
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.

Parameters:
amountSpecifies the amount the given attribute will be decreased.
rangeSpecifies the range of the effect.
attributeString holding the name of the attribute to decrease.
boneNameString holding the name of a bone present in the pawn.
Returns:
Nothing.
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.

Note:
Sync points for the camera are automatically inserted after each Speak command. When pressing the space bar to skip the text display and/or the audio playback also the camera will fast-forward its movements till the next sync point is reached.
Parameters:
textSectionString holding the name of a section in the conversation text file.
soundString holding the name of the sound file (WAV, OGG, MP3) in the dubbing directory to play (optional).
textScrollSpeedfloat value specifying the speed at which the individual letters of the text will be diplayed (optional).
textDisplayTimefloat value specifying the amount of time (in seconds) the text will be shown once it is completely displayed (optional).
Returns:
Nothing.
void PawnLow::PlaySound ( string  filename)

Play the WAV file filename once using the default audible range.

Parameters:
filenameString holding the name of the WAV file to play. The .wav extension must be included in the name.
Returns:
Nothing.
void PawnLow::PlaySound ( string  filename,
float  distance 
)

Play the WAV file filename once.

Parameters:
filenameString holding the name of the WAV file to play. The .wav extension must be included in the name.
distanceSpecifies the audible radius of the sound.
Returns:
Nothing.
void PawnLow::StartSoundTrack ( string  filename)

Play the audio stream filename.

Parameters:
filenameString holding the name of the audio file (MP3, OGG, WAV) to stream.
Returns:
Nothing.
void PawnLow::StopAllAudioStreams ( )

Stop all audio streams.

Returns:
Nothing.
void PawnLow::AttachCamera ( )

Attach the engine camera to the pawn.

Returns:
Nothing.
void PawnLow::AttachCameraToBone ( string  boneName)

Attach the engine camera to the specified bone of the pawn.

Parameters:
boneNameString holding the name of a bone present in the pawn.
Returns:
Nothing.
void PawnLow::AttachCameraToEntity ( string  szEntityName,
string  boneName 
)

Attach the engine camera to the specified bone of the specified entity.

Parameters:
szEntityNameString holding the name of the entity to attach the camera to.
boneNameString holding the name of a bone present in the entity's actor.
Returns:
Nothing.
void PawnLow::DetachCamera ( )

Returns the camera control to the player.

Returns:
Nothing.
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.

Parameters:
anglefloat value specifying the tilt angle in radians.
Returns:
Nothing.
void PawnLow::SwitchView ( int  viewMode)

Switch to the specified view.

Parameters:
viewModeSpecifies the view mode (0 - 3) as described for the ViewSwitch entity.
Returns:
Nothing.
int PawnLow::GetScreenWidth ( )

Get the width of the screen.

Returns:
the width of the screen in pixels.
int PawnLow::GetScreenHeight ( )

Get the height of the screen.

Returns:
the height of the screen in pixels.
void PawnLow::SetCameraWindow ( float  fov)

Set the field of view of the camera.

Parameters:
fovField of view in radians.
Returns:
Nothing.
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.

Parameters:
fovField of view in radians.
useWidthHeight
  • true to interpret the last 2 parameters as width and height of the viewport.
  • false to interpret the last 2 parameters as bottom right corner of the viewport.
leftint value defining the left x-coordinate of the viewport.
topint value defining the upper y-coordinate of the viewport.
width_rightint value defining the width or the right x-coordinate of the viewport.
height_bottomint value defining the height or the bottom y-coordinate of the viewport.
Returns:
Nothing.
void PawnLow::SetFixedCameraPosition ( float  x,
float  y,
float  z 
)

Set the position of the currently active FixedCamera to (x, y, z).

Parameters:
xfloat value specifying the x position.
yfloat value specifying the y position.
zfloat value specifying the z position.
Returns:
Nothing.
void PawnLow::SetFixedCameraRotation ( float  angleX,
float  angleY,
float  angleZ 
)

Set the rotation of the currently active FixedCamera to (angleX, angleY, angleZ).

Parameters:
angleXfloat value specifying the new rotation around the x-axis (in degrees).
angleYfloat value specifying the new rotation around the y-axis (in degrees).
angleZfloat value specifying the new rotation around the z-axis (in degrees).
Returns:
Nothing.
void PawnLow::SetFixedCameraFOV ( float  fov)

Set the field of view of the currently active FixedCamera.

Parameters:
fovField of view in radians.
Returns:
Nothing.
void PawnLow::MoveFixedCamera ( float  offsetX,
float  offsetY,
float  offsetZ 
)

Move the currently active FixedCamera.

Parameters:
offsetXfloat value specifying the distance to move in x-direction.
offsetYfloat value specifying the distance to move in y-direction.
offsetZfloat value specifying the distance to move in z-direction.
Returns:
Nothing.
void PawnLow::RotateFixedCamera ( float  angleX,
float  angleY,
float  angleZ 
)

Rotate the currently active FixedCamera.

Parameters:
angleXfloat value specifying the angle to rotate around the x-axis (in degrees).
angleYfloat value specifying the angle to rotate around the y-axis (in degrees).
angleZfloat value specifying the angle to rotate around the z-axis (in degrees).
Returns:
Nothing.
void PawnLow::SetGravity ( float  x,
float  y,
float  z 
)

Set the gravitational force.

Parameters:
xSpecifies the x-component of the gravitational force.
ySpecifies the y-component of the gravitational force.
zSpecifies the z-component of the gravitational force.
Returns:
Nothing.
float PawnLow::GetGravityX ( )

Get the x-component of the gravity.

Returns:
the x-component of the gravitational force.
float PawnLow::GetGravityY ( )

Get the y-component of the gravity.

Returns:
the y-component of the gravitational force.
float PawnLow::GetGravityZ ( )

Get the z-component of the gravity.

Returns:
the z-component of the gravitational force.
void PawnLow::SetWind ( float  x,
float  y,
float  z 
)

Set the wind force that influences particles.

Parameters:
xSpecifies the x-component of the wind.
ySpecifies the y-component of the wind.
zSpecifies the z-component of the wind.
Returns:
Nothing.
float PawnLow::GetWindX ( )

Get the x-component of the wind.

Returns:
the x-component of the wind.
float PawnLow::GetWindY ( )

Get the y-component of the wind.

Returns:
the y-component of the wind.
float PawnLow::GetWindZ ( )

Get the z-component of the wind.

Returns:
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.

Parameters:
xSpecifies the x-component of the wind base.
ySpecifies the y-component of the wind base.
zSpecifies the z-component of the wind base.
Returns:
Nothing.
float PawnLow::GetWindBaseX ( )

Get the x-component of the wind base.

Returns:
the x-component of the wind base.
float PawnLow::GetWindBaseY ( )

Get the y-component of the wind base.

Returns:
the y-component of the wind base.
float PawnLow::GetWindBaseZ ( )

Get the z-component of the wind base.

Returns:
the z-component of the wind base.
void PawnLow::SetWindGenerator ( bool  enable)

Enable/Disable the WindGenerator entity.

Parameters:
enable
  • true to enable the WindGenerator entity.
  • false to disable the WindGenerator entity.
Returns:
Nothing.
bool PawnLow::IsInLiquid ( )

Check if the pawn is inside a Liquid entity.

Returns:
  • true if the pawn is inside a Liquid entity.
  • false if the pawn is not inside a Liquid entity.
string PawnLow::GetLiquid ( )

Get the name of the Liquid entity the pawn is in.

Returns:
the name of the Liquid entity the pawn is in or an empty string ("") 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.

Parameters:
sectionString holding the name of a section in the material.ini file.
Returns:
Nothing.
void PawnLow::ChangeWeaponMaterial ( string  section)

Change the material on the pawn's weapon actor according to the specified section of material.ini.

Parameters:
sectionString holding the name of a section in the material.ini file.
Returns:
Nothing.
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.

Parameters:
flipbookString holding the name of a Flipbook entity.
actorMaterialIndexinteger value specifying the index of the actor material to change.
flipbookImageIndexinteger value specifying the index of the image to use.
rSpecifies the red color value of the image.
gSpecifies the green color value of the image.
bSpecifies the blue color value of the image.
Returns:
  • true on success.
  • false if the method failed.
void PawnLow::SetShadowFromFlip ( string  flipbook,
string  szEntityName 
)

Set the images of a FlipBook entity as shadow bitmap for the specified entity's actor.

Parameters:
flipbookString holding the name of a Flipbook entity.
szEntityNameString holding the name of the entity to set the shadow for.
Returns:
Nothing.
void PawnLow::DrawPolyShadow ( )

Draw a projected shadow beneath the pawn.

Returns:
Nothing.
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).

Parameters:
explosionString holding the name of a section in the explosion.ini file.
boneNameString holding the name of a bone present in the pawn.
offsetXfloat value specifying the offset in x-direction.
offsetYfloat value specifying the offset in y-direction.
offsetZfloat value specifying the offset in z-direction.
Returns:
Nothing.
void PawnLow::DrawText ( string  text,
int  x,
int  y,
string  font 
)

Display the given text onto the screen using the specified font and position.

Deprecated:
This function is deprecated and will be removed for the 0.80.0 release. Use Font.drawText instead.
Parameters:
textString holding the text to display.
xinteger value defining the x-position to draw the text on the screen.
yinteger value defining the y-position to draw the text on the screen.
fontString specifying the font to use.
Returns:
Nothing.
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.

Deprecated:
This function is deprecated and will be removed in a future release.
Note:
textIDs are shared among all scripts. Hence, when using the ShowText or ShowTextDelay methods to display multiple text objects simultaneously each method has to use a unique textID. To display a text in multiple lines <CR> can be used as a separator.
Parameters:
textIDinteger value used to identify this text object (0 - 19).
szEntityNameString holding the name of the entity to attach the text to ("Player" to specify the player). Use an empty string ("") for absolute screen coordinates.
animationString 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.
textString holding the text to display.
fontString specifying the font to use.
soundString holding the name of a WAV file to play once while the text is displayed. (not implemented)
xinteger value defining the relative or absolute x-position to draw the text on the screen.
yinteger value defining the relative or absolute y-position to draw the text on the screen.
alignString defining the alignment of the text relative to the origin of the entity/player ("left", "right", "center").
alphafloat value specifying the transparency of the text with 0 being fully transparent and 255 being fully opaque.
Returns:
Nothing.
void PawnLow::RemoveText ( int  textID)

Remove the text object with the ID textID displayed by the ShowText or ShowTextDelay method.

Deprecated:
This function is deprecated and will be removed in a future release.
Parameters:
textIDinteger value used to identify a text object (0 - 19).
Returns:
Nothing.
void PawnLow::SetGamma ( float  gamma)

Set the gamma value.

Parameters:
gammaSpecifies the new gamma value.
Returns:
Nothing.
float PawnLow::GetGamma ( )

Get the gamma value.

Returns:
the current 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.

Deprecated:
This function is deprecated and will be removed in a future release.
Note:
The HUD is displayed on top of the colored rectangle.
Parameters:
areaIDinteger value used to identify the area object (0 - 19).
keepVisible
  • true to keep the rectangle visible independent of the selected ThinkTime.
  • false to hide the rectangle in the next iteration.
alphafloat value specifying the transparency of the rectangle with 0 being fully transparent and 255 being fully opaque.
rSpecifies the red color value of the rectangle.
gSpecifies the green color value of the rectangle.
bSpecifies the blue color value of the rectangle.
Returns:
Nothing.
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.

Deprecated:
This function is deprecated and will be removed in a future release.
Note:
The HUD is displayed on top of the colored rectangle.
Parameters:
areaIDinteger value used to identify the area object (0 - 19).
keepVisible
  • true to keep the rectangle visible independent of the selected ThinkTime.
  • false to hide the rectangle in the next iteration.
alphafloat value specifying the transparency of the rectangle with 0 being fully transparent and 255 being fully opaque.
rSpecifies the red color value of the rectangle.
gSpecifies the green color value of the rectangle.
bSpecifies the blue color value of the rectangle.
leftint value defining the left x-coordinate of the rectangle.
topint value defining the upper y-coordinate of the rectangle.
rightint value defining the right x-coordinate of the rectangle.
bottomint value defining the the bottom y-coordinate of the rectangle.
Returns:
Nothing.
void PawnLow::RemoveScreenArea ( int  areaID)

Remove the area with the ID areaID.

Deprecated:
This function is deprecated and will be removed in a future release.
Parameters:
areaIDinteger value used to identify the area object to hide (0 - 19).
Returns:
Nothing.
void PawnLow::ShowHudPicture ( int  pictureID,
bool  show 
)

Show or hide a HUD picture element (BMP, JPG, TGA, PNG or animated GIF).

Deprecated:
This function is deprecated and will be removed in a future release.
Note:
HUD pictures are always displayed on top of the HUD or areas displayed by the FillScreenArea method but below text objects displayed by the ShowText or ShowTextDelay method. HUD pictures with higher IDs are displayed on top of HUD pictures with lower IDs.
Parameters:
pictureIDinteger value used to identify the HUD picture to show or hide.
show
  • true to show the picture.
  • false to hide the picture.
Returns:
Nothing.
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).

Deprecated:
This function is deprecated and will be removed in a future release.
Note:
HUD pictures are always displayed on top of the HUD or areas displayed by the FillScreenArea method but below text objects displayed by the ShowText or ShowTextDelay method. HUD pictures with higher IDs are displayed on top of HUD pictures with lower IDs.
Parameters:
pictureIDinteger value used to identify the HUD picture to show or hide.
show
  • true to show the picture.
  • false to hide the picture.
szEntityNameString 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.
xinteger value defining the relative or absolute x-position to draw the picture on the screen.
yinteger value defining the relative or absolute y-position to draw the picture on the screen.
timetime in seconds to display the picture. If 0 the picture is displayed for one frame.
leftinteger value to specify the left starting pixel of the HUD picture.
topinteger value to specify the top starting pixel of the HUD picture.
Returns:
Nothing.
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.

Parameters:
highlight
  • true to highlight the actor the cursor is hovering over.
  • false to leave the color of the actor unchanged.
selectablePlayer
  • true to make the player selectable.
  • false to prevent the player from being selected.
fillColorRSpecifies the red color value of the highlighted actor.
fillColorGSpecifies the green color value of the highlighted actor.
fillColorBSpecifies the blue color value of the highlighted actor.
ambientColorRSpecifies the red ambient color value of the highlighted actor.
ambientColorGSpecifies the green ambient color value of the highlighted actor.
ambientColorBSpecifies the blue ambient color value of the highlighted actor.
Returns:
the szEntityName of an actor whose bounding box is below the cursor.
void PawnLow::MouseControlledPlayer ( bool  flag)

Define whether the player can be controlled with the mouse or not.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Player.SetMouseControlled instead.
Parameters:
flag
  • true to control the player by mouse movement.
  • false to turn off mouse control.
Returns:
Nothing.
void PawnLow::ShowMouse ( bool  show)

Show or hide the mouse cursor.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use GUI.MouseCursor.setVisible() instead.
Parameters:
show
  • true to show the mouse cursor.
  • false to hide the mouse cursor.
Returns:
Nothing.
int PawnLow::GetMousePosX ( )

Get the x-position of the mouse cursor.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Input.GetMousePosition() instead.
Returns:
the x-position of the mouse cursor.
int PawnLow::GetMousePosY ( )

Get the y-position of the mouse cursor.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Input.GetMousePosition() instead.
Returns:
the y-position of the mouse cursor.
void PawnLow::SetMousePos ( int  x,
int  y 
)

Set the mouse cursor to the specified position.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Input.SetMousePosition() instead.
Parameters:
xSpecifies the new x-position of the mouse cursor.
ySpecifies the new y-position of the mouse cursor.
Returns:
Nothing.
bool PawnLow::IsButtonDown ( int  joystickID,
int  buttonID 
)

Get the state of the button with the ID buttonID of the specified joystick.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Input.IsJoystickButtonDown instead.
Parameters:
joystickIDinteger value used to identify the joystick (0 - 3).
buttonIDinteger value used to identify the button.
Returns:
the state of the specified joystick button.
int PawnLow::GetJoyAxisX ( int  joystickID)

Get the left-right movement of the specified joystick.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Input.GetJoystickAxisX instead.
Parameters:
joystickIDinteger value used to identify the joystick (0 - 3).
Returns:
the left-right movement of the stick.
int PawnLow::GetJoyAxisY ( int  joystickID)

Get the forward-backward movement of the specified joystick.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Input.GetJoystickAxisY instead.
Parameters:
joystickIDinteger value used to identify the joystick (0 - 3).
Returns:
the forward-backward movement of the stick.
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.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Input.GetJoystickAxisZ instead.
Parameters:
joystickIDinteger value used to identify the joystick (0 - 3).
Returns:
the z-axis value of the stick.
int PawnLow::GetNumJoysticks ( )

Get the number of joysticks connected to the system.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Input.GetNumberOfJoysticks instead.
Returns:
the number of joysticks connected to the system.
bool PawnLow::IsEntityVsible ( string  szEntityName)

Check if the specified entity is visible.

Parameters:
szEntityNameString holding the name of the entity to check.
Returns:
  • true if the specified entity is visible.
  • false if the specified entity is not visible.
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").

Parameters:
szEntityNameString holding the name of the entity to change.
fillColorRSpecifies the new red color value of the entity's actor.
fillColorGSpecifies the new green color value of the entity's actor.
fillColorBSpecifies the new blue color value of the entity's actor.
ambientColorRSpecifies the new red ambient color value of the entity's actor.
ambientColorGSpecifies the new green ambient color value of the entity's actor.
ambientColorBSpecifies the new blue ambient color value of the entity's actor.
Returns:
Nothing.
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").

Parameters:
szEntityNameString holding the name of the entity to change.
alphafloat value specifying the transparency of the actor with 0 being fully transparent and 255 being fully opaque.
Returns:
Nothing.
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").

Parameters:
szEntityNameString holding the name of the entity of which to get the alpha value.
Returns:
the alpha value of the specified entity.
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").

Parameters:
szEntityNameString holding the name of the entity to scale.
scalefloat value specifying the scale of the actor in x, y and z direction.
Returns:
Nothing.
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").

Parameters:
szEntityNameString holding the name of the entity to scale.
scaleXfloat value specifying the scale of the actor in x direction.
scaleYfloat value specifying the scale of the actor in y direction.
scaleZfloat value specifying the scale of the actor in z direction.
Returns:
Nothing.
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").

Parameters:
szEntityNameString holding the name of the entity to position.
xfloat value specifying the x position.
yfloat value specifying the y position.
zfloat value specifying the z position.
Returns:
Nothing.
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").

Parameters:
szEntityNameString holding the name of the entity to rotate.
xfloat value specifying the x rotation (in degrees).
yfloat value specifying the y rotation (in degrees).
zfloat value specifying the z rotation (in degrees).
Returns:
Nothing.
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").

Parameters:
szEntityNameString holding the name of the entity to move.
xfloat value specifying the amount to move in x direction.
yfloat value specifying the amount to move in y direction.
zfloat value specifying the amount to move in z direction.
Returns:
Nothing.
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").

Parameters:
szEntityNameString holding the name of the entity to rotate.
xfloat value specifying the amount to rotate around the x axis (in degrees).
yfloat value specifying the amount to rotate around the y axis (in degrees).
zfloat value specifying the amount to rotate around the z axis (in degrees).
Returns:
Nothing.
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").

Parameters:
szEntityNameString holding the name of the entity.
Returns:
the x-position of the specified 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").

Parameters:
szEntityNameString holding the name of the entity.
Returns:
the y-position of the specified 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").

Parameters:
szEntityNameString holding the name of the entity.
Returns:
the z-position of the specified 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").

Parameters:
szEntityNameString holding the name of the entity.
Returns:
the current yaw of the specified 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.

Parameters:
szEntityNameString holding the name of the entity.
Returns:
the x-position of the specified entity in screen coordinates.
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.

Parameters:
szEntityNameString holding the name of the entity.
Returns:
the y-position of the specified entity in screen coordinates.
float PawnLow::GetBoneX ( string  szEntityName,
string  boneName 
)

Get the x-coordinate of the specified bone for the given entity.

Parameters:
szEntityNameString holding the name of the entity owning the bone.
boneNameString holding the name of a bone present in the specified entity.
Returns:
the x-position of the specified bone.
float PawnLow::GetBoneY ( string  szEntityName,
string  boneName 
)

Get the y-coordinate of the specified bone for the given entity.

Parameters:
szEntityNameString holding the name of the entity owning the bone.
boneNameString holding the name of a bone present in the specified entity.
Returns:
the y-position of the specified bone.
float PawnLow::GetBoneZ ( string  szEntityName,
string  boneName 
)

Get the z-coordinate of the specified bone for the given entity.

Parameters:
szEntityNameString holding the name of the entity owning the bone.
boneNameString holding the name of a bone present in the specified entity.
Returns:
the z-position of the specified bone.
float PawnLow::GetBoneYaw ( string  szEntityName,
string  boneName 
)

Get the yaw of the specified bone for the given entity.

Parameters:
szEntityNameString holding the name of the entity owning the bone.
boneNameString holding the name of a bone present in the specified entity.
Returns:
the y-rotation of the specified bone.
float PawnLow::GetBoneToBone ( string  boneName,
string  targetEntityName,
string  targetBoneName 
)

Get the distance between the pawn's bone and the specified target's bone.

Parameters:
boneNameString holding the name of a bone present in the pawn.
targetEntityNameString holding the name of the entity owning the target bone.
targetBoneNameString holding the name of a bone present in the target entity.
Returns:
the distance between the pawn's bone and the specified target's bone.
string PawnLow::GetLastBoneHit ( )

Get the name of the bone last hit in this pawn.

Returns:
the name of the bone last hit.
int PawnLow::GetStringLength ( string  text)

Get the length of the given string.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use the built-in Simkin method length instead.
Parameters:
textString to get the length of.
Returns:
the length of the given string.
string PawnLow::StringCopy ( string  text)

Transfer the contents of the given string variable into another string variable.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use the built-in Simkin method toString instead.
Parameters:
textString to copy.
Returns:
a copy of the given string.
string PawnLow::LeftCopy ( string  text,
int  numChars 
)

Get the first numChars characters from the given string.

Parameters:
textString to copy.
numCharsSpecifies the number of characters to copy.
Returns:
the substring of desired length.
string PawnLow::RightCopy ( string  text,
int  numChars 
)

Get the last numChars characters from the given string.

Parameters:
textString to copy.
numCharsSpecifies the number of characters to copy.
Returns:
the substring of desired length.
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.

Parameters:
variableSpecifies any variable from the script and can be of any type (i.e. string, float, int or bool).
Returns:
Nothing.

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.

Parameters:
orderString holding the name of the high level order that will be executed next.
Returns:
Nothing.
void PawnLow::EndScript ( )

Stop the execution of the script (without removing the pawn's actor).

Returns:
Nothing.
void PawnLow::SetHudDraw ( bool  show)

Show or hide the HUD.

Parameters:
show
  • true to show the HUD
  • false to hide the HUD.
Returns:
Nothing.
bool PawnLow::GetHudDraw ( )

Get the Hud drawing state.

Returns:
  • true if the HUD is shown.
  • false if the HUD is hidden.
void PawnLow::ActivateHudElement ( string  attribute,
bool  activate 
)

Activate or deactivate the HUD element representing the specified attribute.

Parameters:
attributeString holding the name of the attribute whose HUD element to activate/deactivate.
activate
  • true to activate the HUD element.
  • false to deactivate the HUD element.
Returns:
Nothing.
int PawnLow::GetCurFlipBook ( string  flipbook)

Get the index of the current image of the specified FlipBook entity.

Parameters:
flipbookString holding the name of the FlipBook entity to check.
Returns:
the index of the current image of the specified FlipBook entity.
string PawnLow::GetGroundTexture ( )

Get the name of the texture beneath the pawn.

Returns:
the name of the texture beneath the pawn.
string PawnLow::GetPlayerGroundTexture ( )

Get the name of the texture beneath the player.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Player.GetGroundTexture instead.
Returns:
the name of the texture beneath the player.
void PawnLow::SetUseItem ( string  item)

Set the specified item to be the current Use Item.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Player.SetUseItem instead.
Parameters:
itemString holding the name of the item to set as Use Item.
Returns:
Nothing.
void PawnLow::ClearUseItem ( string  item)

Remove the specified Use Item.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Player.ClearUseItem instead.
Parameters:
itemString holding the name of the Use Item to remove.
Returns:
Nothing.
void PawnLow::SetKeyPause ( bool  pause)

Pause or restore the keyboard control.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Input.SetEnabled instead.
Parameters:
pause
  • true to pause the keyboard control.
  • false to restore the keyboard control.
Returns:
Nothing.
bool PawnLow::IsKeyDown ( int  key)

Check if the specified key is pressed.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Input.IsKeyDown instead.
Note:
Use the self.key_pressed script variable to display the mapping of the keyboard.
Parameters:
keyinteger value specifying the key to check.
Returns:
  • true if the specified key is pressed.
  • false if the specified key is not pressed.
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.

Parameters:
boneNameSpecifies the name of a bone present in the pawn.
offsetXSpecifies the offset in x-direction relative to the direction the pawn is facing.
offsetYSpecifies the offset in y-direction relative to the direction the pawn is facing.
offsetZSpecifies the offset in z-direction relative to the direction the pawn is facing.
Returns:
the szEntityName of any pawn actor that it intersects, or "FALSE" if no pawn is intersected or the bone does not exist.
int PawnLow::WhereIsPlayer ( )

Get the direction to the player.

Returns:
  • 0 if the player is in front of the pawn.
  • 1 if the player is behind the pawn.
  • 2 if the player is to the right of the pawn.
  • 3 if the player is to the left of the pawn.
int PawnLow::WhereIsEntity ( string  szEntityName)

Get the direction to the specified entity.

Parameters:
szEntityNameString holding the name of the entity to check.
Returns:
  • 0 if the specified entity is in front of the pawn.
  • 1 if the specified entity is behind the pawn.
  • 2 if the specified entity is to the right of the pawn.
  • 3 if the specified entity is to the left of the pawn.
int PawnLow::random ( int  lower,
int  upper 
)

Generate a random integer number in the range lower to upper.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Math.rand() instead.
Parameters:
lowerSpecifies the lower limit of the random number.
upperSpecifies the upper limit of the random number.
Returns:
a random integer number in the given range.
int PawnLow::Integer ( float  value)

Get the integer portion of the given value.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use the built-in Simkin method toInt instead.
Parameters:
valuefloat value that is to be converted to an integer.
Returns:
the integer portion of the given value.
float PawnLow::sin ( float  value)

Get the sine of the given value.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Math.sin instead.
Parameters:
valuefloat value to calculate the sine of (in radians).
Returns:
the sine of the given value.
float PawnLow::cos ( float  value)

Get the cosine of the given value.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Math.cos instead.
Parameters:
valuefloat value to calculate the cosine of (in radians).
Returns:
the cosine of the given value.
float PawnLow::tan ( float  value)

Get the tangent of the given value.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Math.tan instead.
Parameters:
valuefloat value to calculate the tangent of (in radians).
Returns:
the tangent of the given value.
float PawnLow::asin ( float  value)

Get the arc sine of the given value.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Math.asin instead.
Parameters:
valuefloat value to calculate the arc sine of.
Returns:
the principal value of the arc sine of the given value (in radians).
float PawnLow::acos ( float  value)

Get the arc cosine of the given value.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Math.acos instead.
Parameters:
valuefloat value to calculate the arc cosine of.
Returns:
the principal value of the arc cosine of the given value (in radians).
float PawnLow::atan ( float  value)

Get the arc tangent of the given value.

Deprecated:
This function is redundant and will be removed for the 0.80.0 release. Use Math.atan instead.
Parameters:
valuefloat value to calculate the arc tangent of.
Returns:
the principal value of the arc tangent of the given value (in radians).