All methods to control a pawn in high level mode. More...
Public Member Functions | |
void | Scale (float scale) |
Scale the pawn actor size by scale. | |
void | Scale (float scaleX, float scaleY, float scaleZ) |
Scale the pawn actor size by scaleX, scaleY and scaleZ. | |
void | SetScale (float scaleX, float scaleY, float scaleZ) |
Set the scale of the pawn's actor to the given values. | |
void | SetFOV (float angle, string boneName="") |
Set the field of view (FOV) of the pawn to the specified angle. | |
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 | IsPushable (bool flag) |
Set whether the pawn can be pushed by the player. | |
void | IsVehicle (bool flag) |
Set whether the pawn will be made a vehicle. | |
void | SetLODDistance (float distance1, float distance2, float distance3, float distance4, float distance5) |
Set the LOD distances used for the pawn's actor. | |
void | BoxWidth (float width) |
Set the pawn actor's bounding box width and depth to width. The height remains unchanged. | |
void | BoxHeight (float height) |
Set the pawn actor's bounding box height to height. The width and depth remain unchanged. | |
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 | Move (string animation, float speed, float distance, float angleX=0.0, float angleY=0.0, float angleZ=0.0, string sound="") |
Move the actor distance texels at speed texels per second in the direction obtained by adding angleX, angleY and angleZ to the forward direction while playing the specified actor animation. | |
void | MoveForward (string animation, float speed, float distance, string sound) |
Move the actor forward for distance texels at speed texels per second while playing the specified actor animation. | |
void | MoveBackward (string animation, float speed, float distance, string sound) |
Move the actor backward for distance texels at speed texels per second while playing the specified actor animation. | |
void | MoveRight (string animation, float speed, float distance, string sound) |
Move the actor right for distance texels at speed texels per second while playing the specified actor animation. | |
void | MoveLeft (string animation, float speed, float distance, string sound) |
Move the actor left for distance texels at speed texels per second while playing the specified actor animation. | |
void | MoveToPoint (string animation, float speed, string sound) |
Move the actor to the current valid ScriptPoint at speed texels per second while playing the specified actor animation. | |
void | MoveToTarget (string animation, float speed, string sound) |
Move the actor towards the current valid target at speed texels per second while playing the specified actor animation. | |
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 | Rotate (string animation, float angularSpeed, float angleX, float angleY, float angleZ, string sound) |
Rotate the actor the number of degrees in angleX, angleY and angleZ at a rotation speed of angularSpeed degrees per second while playing the specified actor animation. | |
void | Align () |
Rotate the actor so it faces in the direction of the current valid ScriptPoint's direction vector. | |
void | RotateToAlign (string animation, float angularSpeed, bool flag, string sound) |
Rotate the actor to face along the current valid ScriptPoint's direction vector at angularSpeed degrees per second while playing the specified actor animation. | |
void | RotateToPoint (string animation, float angularSpeed, bool flag, string sound) |
Rotate the actor to face the current valid ScriptPoint at angularSpeed degrees per second while playing the specified actor animation. | |
void | RotateAroundPointRight (string animation, float angularSpeed, float time, string sound) |
Rotate the actor to its right around the current valid ScriptPoint at angularSpeed degrees per second for time number of seconds. | |
void | RotateAroundPointLeft (string animation, float angularSpeed, float time, string sound) |
Rotate the actor to its left around the current valid ScriptPoint at angularSpeed degrees per second for time number of seconds. | |
void | RotateMoveToPoint (string animation, float angularSpeed, float speed, bool flag, string sound) |
Rotate the actor to face the current valid ScriptPoint at angularSpeed degrees per second while playing the specified actor animation. The actor will be moved forward at speed texels per second while the rotation is taking place. | |
void | RotateMove (string animation, float angularSpeed, float speed, float angleX, float angleY, float angleZ, string sound) |
Rotate the actor the number of degrees in angleX, angleY, and angleZ at angularSpeed degrees per second while playing the specified actor animation. The actor will be moved forward at speed texels per second while the rotation is taking place. | |
void | RotateToTarget (string animation, float angularSpeed, bool flag, string sound) |
Rotate the actor to face the current target while playing the specified actor animation. | |
void | RotateMoveToTarget (string animation, float angularSpeed, float speed, bool flag, string sound) |
Simultaneously move and rotate the actor towards the current target while playing the specified actor animation. | |
void | RotateToPlayer (string animation, float angularSpeed, bool flag, string sound) |
Rotate the actor to face the player while playing the specified actor animation. | |
void | FacePlayer (bool track, bool flag) |
Rotate the actor to face the player. | |
void | Jump (string animation, float force, bool flag, string sound) |
Make the actor jump upward while playing the specified actor animation. | |
void | Delay (string animation, float time, string sound) |
Wait for time seconds before continuing to the next action. | |
void | PlayAnimation (string animation, bool flag, string sound) |
Play back the specified actor animation. | |
void | BlendToAnimation (string animation, float time, bool flag, string sound) |
Blend from the current animation to the specified animation in time amount of seconds, then play that animation. | |
void | LoopAnimation (string animation, float time, string sound) |
Loop the specified animation for the given time before continuing to the next action. | |
void | AnimationSpeed (float speed) |
Change the speed of the pawn actor's animation by multiplying it by speed. | |
void | AnimateStop (string animation, float time, string sound) |
Play the specified actor animation and then stop at the end of the animation for time seconds before continuing to the next action. | |
void | AddTriggerOrder (string order, string trigger, float time) |
Add to the list of triggers being checked by the pawn the specified trigger. | |
void | DelTriggerOrder (string trigger) |
Remove the trigger called trigger from the list of triggers being watched by the pawn. | |
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 | PlayerDistOrder (float distance, string order) |
Register a Script Order that is to be executed when the player enters/leaves the specified range to the pawn. | |
void | AddDistanceOrder (int distanceID, float distance, string order) |
This is the same as PlayerDistOrder() except that an ID, distanceID, is associated with the checking. | |
void | DelDistanceOrder (int distanceID) |
Remove the distance check identified by distanceID from the list of distances being checked by the pawn. | |
void | AddCollisionOrder (string order) |
If the player collides with the pawn's actor then the specified Script Order will be executed. | |
void | DelCollisionOrder () |
Remove the collision check order. | |
void | AvoidOrder (string order) |
If the pawn hits an obstacle during the action MoveToPoint() it will run the Script Order called order before returning to the MoveToPoint() action. | |
void | AddPainOrder (string order, int percent) |
If the pawn has been given an attribute value using AttributeOrder(), then order will be called when the attribute value decreases. | |
void | Return () |
Used to terminate the Script Order called by the obstacle avoidance of MoveToPoint() or the AddPainOrder(). | |
void | RestartOrder () |
Restart the current order from the beginning. | |
void | NextPoint () |
Get the NextPoint entry from the current ScriptPoint and make it the current ScriptPoint. | |
void | NextOrder () |
Get the NextOrder entry from the current ScriptPoint and start executing the actions contained in it. | |
void | NewPath (string pointName) |
Switch the pawn to a ScriptPoint named pointName. | |
void | NewPoint (string pointName) |
Switch the pawn to a ScriptPoint named pointName. | |
void | NewOrder (string order) |
Start executing the Script Order called order. The current order is abandoned. | |
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 | AddFlagOrder (int flagID, bool state, string order) |
If the state of the pawn flag flagID is state then Script Order order will be executed. | |
void | DelFlagOrder (int flagID) |
Remove the pawn flag identified by flagID from the list of flags being checked by the pawn. | |
void | AddTimerOrder (int timerID, float time, string order) |
Create a timer with the number timerID and an initial value of time seconds. When the timer counts down to 0 the Script Order order will be executed. | |
void | DelTimerOrder (int timerID) |
Remove the timer with the number timerID from the list of timers being checked by the pawn. | |
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 | AttributeOrder (string attribute, int amount, string order) |
Give the pawn the attribute named attribute and initialize it to amount. When the value of the attribute reaches 0 the Script Order order will be executed. | |
void | TestDamageOrder (float amount, string order) |
When the attribute defined in AttributeOrder() is decreased by damage this method tests for the actual amount of damage that was supposed to have occurred. If the damage was greater than or equal to amount then the Script Order order will be executed. | |
void | Remove (bool state) |
Remove the actor from the level. | |
void | SetGroup (string name) |
Set the name of the group the pawn belongs to. | |
void | HostilePlayer (bool state) |
Set the attitude of the pawn towards the player. | |
void | HostileSame (bool state) |
Set the attitude of the pawn towards pawns of the same group. | |
void | HostileDifferent (bool state) |
Set the attitude of the pawn towards members of a different group. | |
void | TargetGroup (string name) |
If the pawn is set to be hostile to pawns of a different group this will cause the pawn to include in its list of potential targets only those pawns that are in the group name. | |
void | FindTargetOrder (float distance, string order, string attribute) |
Search the area within distance of the pawn for a target to attack. | |
void | FindPointOrder (string order) |
Search the area within 3000 texels of the pawn for the nearest visible ScriptPoint. | |
void | SetWeapon (string section) |
Activate the weapon defined in pawn.ini as section. | |
void | RemoveWeapon () |
Remove the currently activated weapon actor of this pawn. | |
void | FireProjectile (string projectile, string boneName, float offsetX, float offsetY, float offsetZ, string attribute, string sound) |
Shoot a projectile in the direction the pawn is facing. | |
void | AudibleRadius (float distance) |
Set the audible radius for all sounds played by this pawn's script to distance. | |
void | AddRandomSound (int soundID, float minTime, float maxTime, string sound) |
Play back the given sound file at an interval that is randomly chosen between minTime and maxTime each time the sound is played. | |
void | DelRandomSound (int soundID) |
Remove the specified sound from the list of playing sounds. | |
void | SoundLoop (bool flag) |
Set the looping behaviour of sounds played by this pawn's script. | |
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. | |
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 | FadeIn (float time, float alpha) |
Increase the alpha of the actor (and any attached weapon) from its present value to alpha in time seconds. | |
void | FadeOut (float time, float alpha) |
Decrease the alpha of the actor (and any attached weapon) from its present value to alpha in time seconds. | |
void | Console (bool flag) |
Set whether information about this pawn's script is displayed on the screen. | |
void | debug (var variable) |
Output the contents of variable to the console window for this pawn, assuming the console is active. | |
void | LowLevel (string order) |
Switch script execution type from current high level methods to the low level C style programming. | |
void | EndScript () |
Stop the execution of the script (without removing the pawn's actor). | |
void | Conversation () |
Initiate the pawn's conversation, if one is defined. | |
void | Conversation (string order) |
Initiate the pawn's conversation, if one is defined. | |
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 | ShowTextDelay (int textID, string szEntityName, string animation, string text, string font, float time, 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 | 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 | SetHudDraw (bool show) |
Show or hide the HUD. | |
void | HideFromRadar (bool hide) |
Show or hide the pawn on the HUD radar screen. | |
void | MouseControlledPlayer (bool flag) |
Define whether the player can be controlled with the mouse or not. | |
void | SetKeyPause (bool pause) |
Pause or restore the keyboard control. | |
void | AllowUseKey (bool flag) |
Set the Use key control for this pawn. | |
void | AttachToActor (string slave, string slaveBone, string masterBone, float offsetX, float offsetY, float offsetZ, float angleX, float angleY, float angleZ) |
Attach the pawn named slave to this pawn's actor. | |
void | DetachFromActor (string slave) |
Detach the specified pawn from its master. | |
void | AttachBlendActor (string slave, string master=self.EntityName) |
Attach the specified entity to the given master entity. | |
void | DetachBlendActor (string slave, string master=self.EntityName) |
Detach the specified entity from its master. | |
void | AttachAccessory (string slave, string master=self.EntityName) |
Attach the specified accessory to the given master entity. | |
void | DetachAccessory (string slave, string master=self.EntityName) |
Detach the specified accessory from its master. | |
int | random (int lower, int upper) |
Generate a random integer number in the range lower to upper. | |
float | sin (float value) |
Get the sine of the given value. | |
float | cos (float value) |
Get the cosine of the given value. | |
float | tan (float value) |
Get the tangent of the given value. | |
float | asin (float value) |
Get the arc sine of the given value. | |
float | acos (float value) |
Get the arc cosine of the given value. | |
float | atan (float value) |
Get the arc tangent of the given value. |
All methods to control a pawn in high level mode.
void PawnHigh::Scale | ( | float | scale | ) |
Scale the pawn actor size by scale.
If the actor was scaled in the definition in pawn.ini then it will be scaled by that amount times scale. If the pawn has a weapon actor attached it is scaled in the same way.
scale | float value specifying the scale factor in x, y and z direction. |
void PawnHigh::Scale | ( | float | scaleX, |
float | scaleY, | ||
float | scaleZ | ||
) |
Scale the pawn actor size by scaleX, scaleY and scaleZ.
If the actor was scaled in the definition in pawn.ini then it will be scaled by that amount times scaleX, scaleY and scaleZ respectively. If the pawn has a weapon actor attached it is scaled in the same way.
scaleX | float value specifying the scale factor in x direction. |
scaleY | float value specifying the scale factor in y direction. |
scaleZ | float value specifying the scale factor in z direction. |
void PawnHigh::SetScale | ( | float | scaleX, |
float | scaleY, | ||
float | scaleZ | ||
) |
Set the scale of the pawn's actor to the given values.
scaleX | float value specifying the scale of the actor in x direction. |
scaleY | float value specifying the scale of the actor in y direction. |
scaleZ | float value specifying the scale of the actor in z direction. |
void PawnHigh::SetFOV | ( | float | angle, |
string | boneName = "" |
||
) |
Set the field of view (FOV) of the pawn to the specified angle.
This is the total number of degrees from left to right that the pawn can see. The center of the FOV is the direction the pawn or the pawn actor's bone boneName is facing.
angle | Field of view in degrees. |
boneName | String holding the name of a bone present in the pawn's actor, or empty to use the root bone. |
void PawnHigh::StepHeight | ( | float | distance | ) |
Set the step height of the pawn to distance.
distance | Specifies the maximum step height. If less than or equal to zero then step up is disabled for this pawn. |
void PawnHigh::Gravity | ( | bool | state | ) |
Set whether the pawn will be affected by gravity.
state |
|
void PawnHigh::IsPushable | ( | bool | flag | ) |
Set whether the pawn can be pushed by the player.
flag |
|
void PawnHigh::IsVehicle | ( | bool | flag | ) |
Set whether the pawn will be made a vehicle.
flag |
|
void PawnHigh::SetLODDistance | ( | float | distance1, |
float | distance2, | ||
float | distance3, | ||
float | distance4, | ||
float | distance5 | ||
) |
Set the LOD distances used for the pawn's actor.
This overrides the default LOD distances already defined in the EnvironmentSetup entity.
distance1 | float value specifying the distance after which LOD actor 1 is rendered. |
distance2 | float value specifying the distance after which LOD actor 2 is rendered. |
distance3 | float value specifying the distance after which LOD actor 3 is rendered. |
distance4 | float value specifying the distance after which the LOD image is rendered. |
distance5 | float value specifying the distance after which rendering is disabled. |
void PawnHigh::BoxWidth | ( | float | width | ) |
Set the pawn actor's bounding box width and depth to width. The height remains unchanged.
width | float value specifying the width and depth of the bounding box. |
void PawnHigh::BoxHeight | ( | float | height | ) |
Set the pawn actor's bounding box height to height. The width and depth remain unchanged.
height | float value specifying the height of the bounding box. |
void PawnHigh::SetCollision | ( | ) |
Set the actor's bounding box so collisions will occur with other objects.
void PawnHigh::SetNoCollision | ( | ) |
Set the actor's bounding box so that no collisions with it will occur.
The actor will appear in the level but not as a solid object.
void PawnHigh::Move | ( | string | animation, |
float | speed, | ||
float | distance, | ||
float | angleX = 0.0 , |
||
float | angleY = 0.0 , |
||
float | angleZ = 0.0 , |
||
string | sound = "" |
||
) |
Move the actor distance texels at speed texels per second in the direction obtained by adding angleX, angleY and angleZ to the forward direction while playing the specified actor animation.
animation | String holding the name of the animation to play while moving. |
speed | float value specifying the speed at which the pawn moves (in texels per second). |
distance | float value specifying the distance the pawn moves (in texels). |
angleX | float value specifying the rotation around the x-axis (in degrees). |
angleY | float value specifying the rotation around the y-axis (in degrees). |
angleZ | float value specifying the rotation around the z-axis (in degrees). |
sound | String holding the name of the sound file to play while moving. |
void PawnHigh::MoveForward | ( | string | animation, |
float | speed, | ||
float | distance, | ||
string | sound | ||
) |
Move the actor forward for distance texels at speed texels per second while playing the specified actor animation.
animation | String holding the name of the animation to play while moving. |
speed | float value specifying the speed at which the pawn moves (in texels per second). |
distance | float value specifying the distance the pawn moves (in texels). |
sound | String holding the name of the sound file to play while moving. |
void PawnHigh::MoveBackward | ( | string | animation, |
float | speed, | ||
float | distance, | ||
string | sound | ||
) |
Move the actor backward for distance texels at speed texels per second while playing the specified actor animation.
animation | String holding the name of the animation to play while moving. |
speed | float value specifying the speed at which the pawn moves (in texels per second). |
distance | float value specifying the distance the pawn moves (in texels). |
sound | String holding the name of the sound file to play while moving. |
void PawnHigh::MoveRight | ( | string | animation, |
float | speed, | ||
float | distance, | ||
string | sound | ||
) |
Move the actor right for distance texels at speed texels per second while playing the specified actor animation.
animation | String holding the name of the animation to play while moving. |
speed | float value specifying the speed at which the pawn moves (in texels per second). |
distance | float value specifying the distance the pawn moves (in texels). |
sound | String holding the name of the sound file to play while moving. |
void PawnHigh::MoveLeft | ( | string | animation, |
float | speed, | ||
float | distance, | ||
string | sound | ||
) |
Move the actor left for distance texels at speed texels per second while playing the specified actor animation.
animation | String holding the name of the animation to play while moving. |
speed | float value specifying the speed at which the pawn moves (in texels per second). |
distance | float value specifying the distance the pawn moves (in texels). |
sound | String holding the name of the sound file to play while moving. |
void PawnHigh::MoveToPoint | ( | string | animation, |
float | speed, | ||
string | sound | ||
) |
Move the actor to the current valid ScriptPoint at speed texels per second while playing the specified actor animation.
animation | String holding the name of the animation to play while moving. |
speed | float value specifying the speed at which the pawn moves (in texels per second). |
sound | String holding the name of the sound file to play while moving. |
void PawnHigh::MoveToTarget | ( | string | animation, |
float | speed, | ||
string | sound | ||
) |
Move the actor towards the current valid target at speed texels per second while playing the specified actor animation.
animation | String holding the name of the animation to play while moving. |
speed | float value specifying the speed at which the pawn moves (in texels per second). |
sound | String holding the name of the sound file to play while moving. |
void PawnHigh::TeleportToPoint | ( | string | pointName, |
float | offsetX = 0.0 , |
||
float | offsetY = 0.0 , |
||
float | offsetZ = 0.0 , |
||
bool | rotate = false , |
||
string | szEntityName = self.EntityName |
||
) |
Teleport the entity szEntityName to the specified ScriptPoint.
pointName | String holding the name of a ScriptPoint entity. |
offsetX | float value specifying the offset in x direction from the position of the ScriptPoint pointName. |
offsetY | float value specifying the offset in y direction from the position of the ScriptPoint pointName. |
offsetZ | float value specifying the offset in z direction from the position of the ScriptPoint pointName. |
rotate | boolean value that determines whether or not the entity will match the SriptPoint angles after teleport. |
szEntityName | String holding the name of the entity to teleport. |
void PawnHigh::Rotate | ( | string | animation, |
float | angularSpeed, | ||
float | angleX, | ||
float | angleY, | ||
float | angleZ, | ||
string | sound | ||
) |
Rotate the actor the number of degrees in angleX, angleY and angleZ at a rotation speed of angularSpeed degrees per second while playing the specified actor animation.
animation | String holding the name of the animation to play while rotating. |
angularSpeed | float value specifying the speed at which the pawn rotates (in degrees per second). |
angleX | float value specifying the rotation around the x-axis (in degrees). |
angleY | float value specifying the rotation around the y-axis (in degrees). |
angleZ | float value specifying the rotation around the z-axis (in degrees). |
sound | String holding the name of the sound file to play while rotating. |
void PawnHigh::Align | ( | ) |
Rotate the actor so it faces in the direction of the current valid ScriptPoint's direction vector.
void PawnHigh::RotateToAlign | ( | string | animation, |
float | angularSpeed, | ||
bool | flag, | ||
string | sound | ||
) |
Rotate the actor to face along the current valid ScriptPoint's direction vector at angularSpeed degrees per second while playing the specified actor animation.
animation | String holding the name of the animation to play while rotating. |
angularSpeed | float value specifying the speed at which the pawn rotates (in degrees per second). |
flag |
|
sound | String holding the name of the sound file to play while rotating. |
void PawnHigh::RotateToPoint | ( | string | animation, |
float | angularSpeed, | ||
bool | flag, | ||
string | sound | ||
) |
Rotate the actor to face the current valid ScriptPoint at angularSpeed degrees per second while playing the specified actor animation.
animation | String holding the name of the animation to play while rotating. |
angularSpeed | float value specifying the speed at which the pawn rotates (in degrees per second). |
flag |
|
sound | String holding the name of the sound file to play while rotating. |
void PawnHigh::RotateAroundPointRight | ( | string | animation, |
float | angularSpeed, | ||
float | time, | ||
string | sound | ||
) |
Rotate the actor to its right around the current valid ScriptPoint at angularSpeed degrees per second for time number of seconds.
animation | String holding the name of the animation to play while rotating. |
angularSpeed | float value specifying the speed at which the pawn rotates (in degrees per second). |
time | float value specifying the time the rotation will last (in seconds). |
sound | String holding the name of the sound file to play while rotating. |
void PawnHigh::RotateAroundPointLeft | ( | string | animation, |
float | angularSpeed, | ||
float | time, | ||
string | sound | ||
) |
Rotate the actor to its left around the current valid ScriptPoint at angularSpeed degrees per second for time number of seconds.
animation | String holding the name of the animation to play while rotating. |
angularSpeed | float value specifying the speed at which the pawn rotates (in degrees per second). |
time | float value specifying the time the rotation will last (in seconds). |
sound | String holding the name of the sound file to play while rotating. |
void PawnHigh::RotateMoveToPoint | ( | string | animation, |
float | angularSpeed, | ||
float | speed, | ||
bool | flag, | ||
string | sound | ||
) |
Rotate the actor to face the current valid ScriptPoint at angularSpeed degrees per second while playing the specified actor animation. The actor will be moved forward at speed texels per second while the rotation is taking place.
animation | String holding the name of the animation to play while rotating. |
angularSpeed | float value specifying the speed at which the pawn rotates (in degrees per second). |
speed | float value specifying the speed at which the pawn moves (in texels per second). |
flag |
|
sound | String holding the name of the sound file to play while rotating. |
void PawnHigh::RotateMove | ( | string | animation, |
float | angularSpeed, | ||
float | speed, | ||
float | angleX, | ||
float | angleY, | ||
float | angleZ, | ||
string | sound | ||
) |
Rotate the actor the number of degrees in angleX, angleY, and angleZ at angularSpeed degrees per second while playing the specified actor animation. The actor will be moved forward at speed texels per second while the rotation is taking place.
animation | String holding the name of the animation to play while rotating. |
angularSpeed | float value specifying the speed at which the pawn rotates (in degrees per second). |
speed | float value specifying the speed at which the pawn moves (in texels per second). |
angleX | float value specifying the rotation around the x-axis (in degrees). |
angleY | float value specifying the rotation around the y-axis (in degrees). |
angleZ | float value specifying the rotation around the z-axis (in degrees). |
sound | String holding the name of the sound file to play while rotating. |
void PawnHigh::RotateToTarget | ( | string | animation, |
float | angularSpeed, | ||
bool | flag, | ||
string | sound | ||
) |
Rotate the actor to face the current target while playing the specified actor animation.
animation | String holding the name of the animation to play while rotating. |
angularSpeed | float value specifying the speed at which the pawn rotates (in degrees per second). |
flag |
|
sound | String holding the name of the sound file to play while rotating. |
void PawnHigh::RotateMoveToTarget | ( | string | animation, |
float | angularSpeed, | ||
float | speed, | ||
bool | flag, | ||
string | sound | ||
) |
Simultaneously move and rotate the actor towards the current target while playing the specified actor animation.
animation | String holding the name of the animation to play while rotating. |
angularSpeed | float value specifying the speed at which the pawn rotates (in degrees per second). |
speed | float value specifying the speed at which the pawn moves (in texels per second). |
flag |
|
sound | String holding the name of the sound file to play while rotating. |
void PawnHigh::RotateToPlayer | ( | string | animation, |
float | angularSpeed, | ||
bool | flag, | ||
string | sound | ||
) |
Rotate the actor to face the player while playing the specified actor animation.
animation | String holding the name of the animation to play while rotating. |
angularSpeed | float value specifying the speed at which the pawn rotates (in degrees per second). |
flag |
|
sound | String holding the name of the sound file to play while rotating. |
void PawnHigh::FacePlayer | ( | bool | track, |
bool | flag | ||
) |
Rotate the actor to face the player.
track |
|
flag |
|
void PawnHigh::Jump | ( | string | animation, |
float | force, | ||
bool | flag, | ||
string | sound | ||
) |
Make the actor jump upward while playing the specified actor animation.
If flag is true the next action will be executed immediately. Otherwise the actor must land again before the next action takes place.
animation | String holding the name of the animation to play while jumping. |
force | float value specifying the force to accelerate the pawn. |
flag |
|
sound | String holding the name of the sound file to play while jumping. |
void PawnHigh::Delay | ( | string | animation, |
float | time, | ||
string | sound | ||
) |
Wait for time seconds before continuing to the next action.
animation | String holding the name of the animation to play while waiting. |
time | float value specifying the seconds to wait. |
sound | String holding the name of the sound file to play while waiting. |
void PawnHigh::PlayAnimation | ( | string | animation, |
bool | flag, | ||
string | sound | ||
) |
Play back the specified actor animation.
animation | String holding the name of the animation to play. |
flag |
|
sound | String holding the name of the sound file to play. |
void PawnHigh::BlendToAnimation | ( | string | animation, |
float | time, | ||
bool | flag, | ||
string | sound | ||
) |
Blend from the current animation to the specified animation in time amount of seconds, then play that animation.
animation | String holding the name of the animation to blend to. |
time | float value specifying the seconds to blend from the current to the new animation. |
flag |
|
sound | String holding the name of the sound file to play. |
void PawnHigh::LoopAnimation | ( | string | animation, |
float | time, | ||
string | sound | ||
) |
Loop the specified animation for the given time before continuing to the next action.
animation | String holding the name of the animation to play. |
time | float value specifying the seconds to play the animation. |
sound | String holding the name of the sound file to play. |
void PawnHigh::AnimationSpeed | ( | float | speed | ) |
Change the speed of the pawn actor's animation by multiplying it by speed.
speed | float value specifying the scale factor for the animation speed. |
void PawnHigh::AnimateStop | ( | string | animation, |
float | time, | ||
string | sound | ||
) |
Play the specified actor animation and then stop at the end of the animation for time seconds before continuing to the next action.
The animation will remain stopped until a new animation is specified in an action.
animation | String holding the name of the animation to play. |
time | float value specifying the seconds to wait after the animation has finished. If less than 0 then continue on to the next action when the animation has ended. |
sound | String holding the name of the sound file to play once. |
void PawnHigh::AddTriggerOrder | ( | string | order, |
string | trigger, | ||
float | time | ||
) |
Add to the list of triggers being checked by the pawn the specified trigger.
When the state of this trigger goes to on it is removed from the list of watched triggers and the Script Order called order will be executed. Any number of triggers can be added to the watched trigger list of a pawn.
order | String holding the name of the order to execute. |
trigger | String holding the name of the trigger to check. |
time | float value specifying the number of seconds to wait before executing the new order. |
void PawnHigh::DelTriggerOrder | ( | string | trigger | ) |
Remove the trigger called trigger from the list of triggers being watched by the pawn.
trigger | String holding the name of the trigger. |
void PawnHigh::SetEventState | ( | string | event, |
bool | state | ||
) |
Set the state of the named trigger to state.
If the trigger does not exist it will be created.
event | String holding the name of an event trigger. |
state | boolean value specifying the new state of the event trigger. |
bool PawnHigh::GetEventState | ( | string | event | ) |
Return the state of the event trigger named event.
event | String holding the name of the event trigger. |
void PawnHigh::PlayerDistOrder | ( | float | distance, |
string | order | ||
) |
Register a Script Order that is to be executed when the player enters/leaves the specified range to the pawn.
Once order is executed the distance checking is disabled. If the pawn has had its FOV set by SetFOV() then the player must be within the field of view before the distance gets checked.
distance | float value specifying the distance (in texels) to check:
|
order | String holding the name of the order to execute. |
void PawnHigh::AddDistanceOrder | ( | int | distanceID, |
float | distance, | ||
string | order | ||
) |
This is the same as PlayerDistOrder() except that an ID, distanceID, is associated with the checking.
You can have multiple distance orders active at any time, each checking for a different distance.
distanceID | integer value identifying the distance check. |
distance | float value specifying the distance (in texels) to check:
|
order | String holding the name of the order to execute. |
void PawnHigh::DelDistanceOrder | ( | int | distanceID | ) |
Remove the distance check identified by distanceID from the list of distances being checked by the pawn.
distanceID | integer value specifying the distance check to remove. |
void PawnHigh::AddCollisionOrder | ( | string | order | ) |
If the player collides with the pawn's actor then the specified Script Order will be executed.
order | String holding the name of the order to execute. |
void PawnHigh::DelCollisionOrder | ( | ) |
Remove the collision check order.
void PawnHigh::AvoidOrder | ( | string | order | ) |
If the pawn hits an obstacle during the action MoveToPoint() it will run the Script Order called order before returning to the MoveToPoint() action.
This is used to run a custom obstacle avoidance routine to get around things that may be in the way.
order | String holding the name of the order to execute. |
void PawnHigh::AddPainOrder | ( | string | order, |
int | percent | ||
) |
If the pawn has been given an attribute value using AttributeOrder(), then order will be called when the attribute value decreases.
When this order is done (by reaching the end of the order or calling Return) control is returned to the point where the pawn was before the order was run.
order | String holding the name of the order to execute. |
percent | integer value specifying the percent of the time this order will be active. If it is 100 then the pain order will be called every time the attribute decreases. If it is 50 the order will be called only half the time. |
void PawnHigh::Return | ( | ) |
Used to terminate the Script Order called by the obstacle avoidance of MoveToPoint() or the AddPainOrder().
The order will also terminate when the last action in it is encountered so calling this method is optional.
void PawnHigh::RestartOrder | ( | ) |
Restart the current order from the beginning.
void PawnHigh::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.
void PawnHigh::NextOrder | ( | ) |
Get the NextOrder entry from the current ScriptPoint and start executing the actions contained in it.
void PawnHigh::NewPath | ( | string | pointName | ) |
Switch the pawn to a ScriptPoint named pointName.
This becomes the current ScriptPoint and the order contained in the NextOrder entry will be executed.
pointName | String holding the name of the new ScriptPoint. |
void PawnHigh::NewPoint | ( | string | pointName | ) |
Switch the pawn to a ScriptPoint named pointName.
This becomes the current ScriptPoint. The current order is still maintained and will continue to be executed.
pointName | String holding the name of the new ScriptPoint. |
void PawnHigh::NewOrder | ( | string | order | ) |
Start executing the Script Order called order. The current order is abandoned.
order | String holding the name of the new order to execute. |
void PawnHigh::SetFlag | ( | int | flagID, |
bool | state | ||
) |
Set the state of the pawn flag flagID to state.
flagID | integer value (0 - 499) identifying the pawn flag to be set. |
state | boolean value specifying the new state of the pawn flag. |
bool PawnHigh::GetFlag | ( | int | flagID | ) |
Get the state of the pawn flag flagID.
flagID | integer value (0 - 499) identifying the pawn flag. |
void PawnHigh::AddFlagOrder | ( | int | flagID, |
bool | state, | ||
string | order | ||
) |
If the state of the pawn flag flagID is state then Script Order order will be executed.
Once order is executed the flag checking is disabled.
flagID | integer value (0 - 499) identifying the pawn flag to check. |
state | boolean value specifying the state of the pawn flag triggering the order execution. |
order | String holding the name of the order to execute. |
void PawnHigh::DelFlagOrder | ( | int | flagID | ) |
Remove the pawn flag identified by flagID from the list of flags being checked by the pawn.
flagID | integer value (0 - 499) identifying the pawn flag check to remove. |
void PawnHigh::AddTimerOrder | ( | int | timerID, |
float | time, | ||
string | order | ||
) |
Create a timer with the number timerID and an initial value of time seconds. When the timer counts down to 0 the Script Order order will be executed.
Once order is executed the timer checking is disabled.
timerID | integer value identifying the timer to check. |
time | float value specifying the number of seconds to wait before executing the order. |
order | String holding the name of the order to execute. |
void PawnHigh::DelTimerOrder | ( | int | timerID | ) |
Remove the timer with the number timerID from the list of timers being checked by the pawn.
timerID | integer value identifying the timer to remove. |
void PawnHigh::SetAttribute | ( | string | attribute, |
int | amount, | ||
string | szEntityName = self.EntityName |
||
) |
Set the value of the attribute attribute of the entity szEntityName to amount.
szEntityName may specify a pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to change. |
amount | integer value determining the new value of the specified attribute. |
szEntityName | String holding the name of the entity owning the attribute. |
int PawnHigh::GetAttribute | ( | string | attribute, |
string | szEntityName = self.EntityName |
||
) |
Get the amount of the attribute attribute of the entity szEntityName.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnHigh::ModifyAttribute | ( | string | attribute, |
int | amount, | ||
string | szEntityName = self.EntityName |
||
) |
Modify the amount of the attribute attribute of the entity szEntityName by amount.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to change. |
amount | integer value determining the amount the specified attribute will be modified by. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnHigh::AddAttribute | ( | string | attribute, |
string | szEntityName = self.EntityName |
||
) |
Give the entity szEntityName the attribute attribute, initialize it to 0 and set the low and high value limits to 0 and 100, respectively.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to create. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnHigh::AddAttribute | ( | string | attribute, |
int | low = 0 , |
||
int | high = 100 , |
||
string | szEntityName = self.EntityName |
||
) |
Give the entity szEntityName the attribute attribute, initialize it to 0 and set the low and high value limits.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to create. |
low | integer value determining the low value limit of the new attribute. |
high | integer value determining the high value limit of the new attribute. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnHigh::SetAttributeValueLimits | ( | string | attribute, |
int | low, | ||
int | high, | ||
string | szEntityName = self.EntityName |
||
) |
Set the low and high value limits of the attribute attribute of the entity szEntityName.
szEntityName may specify a Pawn, a StaticEntityProxy or the player ("Player"
).
attribute | String holding the name of the attribute to modify. |
low | integer value determining the new low value limit of the attribute. |
high | integer value determining the new high value limit of the attribute. |
szEntityName | String holding the name of the entity owning the attribute. |
void PawnHigh::AttributeOrder | ( | string | attribute, |
int | amount, | ||
string | order | ||
) |
Give the pawn the attribute named attribute and initialize it to amount. When the value of the attribute reaches 0 the Script Order order will be executed.
attribute | String holding the name of the attribute to add. |
amount | integer value specifying the initial amount of the attribute. |
order | String holding the name of the order to execute. |
void PawnHigh::TestDamageOrder | ( | float | amount, |
string | order | ||
) |
When the attribute defined in AttributeOrder() is decreased by damage this method tests for the actual amount of damage that was supposed to have occurred. If the damage was greater than or equal to amount then the Script Order order will be executed.
amount | float value specifying the amount of damage to test for. |
order | String holding the name of the order to execute. |
void PawnHigh::Remove | ( | bool | state | ) |
Remove the actor from the level.
state |
|
void PawnHigh::SetGroup | ( | string | name | ) |
Set the name of the group the pawn belongs to.
name | String holding the name of the group the pawn will belong to. |
void PawnHigh::HostilePlayer | ( | bool | state | ) |
Set the attitude of the pawn towards the player.
state |
|
void PawnHigh::HostileSame | ( | bool | state | ) |
Set the attitude of the pawn towards pawns of the same group.
state |
|
void PawnHigh::HostileDifferent | ( | bool | state | ) |
Set the attitude of the pawn towards members of a different group.
state |
|
void PawnHigh::TargetGroup | ( | string | name | ) |
If the pawn is set to be hostile to pawns of a different group this will cause the pawn to include in its list of potential targets only those pawns that are in the group name.
name | String holding the name of the group the pawn will target. |
void PawnHigh::FindTargetOrder | ( | float | distance, |
string | order, | ||
string | attribute | ||
) |
Search the area within distance of the pawn for a target to attack.
The target must have the attribute attribute present to become a target. When a target is acquired the Script Order order will be executed.
distance | float value specifying the distance (in texels) to search for targets. |
order | String holding the name of the order to execute. |
attribute | String holding the name of the attribute the target must have. |
void PawnHigh::FindPointOrder | ( | string | order | ) |
Search the area within 3000 texels of the pawn for the nearest visible ScriptPoint.
Once a ScriptPoint is in the pawn's field of view, it becomes the current ScriptPoint.
order | String holding the name of the order to execute; empty ("" ) to turn off checking. |
void PawnHigh::SetWeapon | ( | string | section | ) |
Activate the weapon defined in pawn.ini as section.
The weapon actor will attach to the pawn actor.
section | String holding the name of a section in the pawn.ini file. |
void PawnHigh::RemoveWeapon | ( | ) |
Remove the currently activated weapon actor of this pawn.
void PawnHigh::FireProjectile | ( | string | projectile, |
string | boneName, | ||
float | offsetX, | ||
float | offsetY, | ||
float | offsetZ, | ||
string | attribute, | ||
string | sound | ||
) |
Shoot a projectile in the direction the pawn is facing.
projectile | String holding the name of the projectile type to fire. |
boneName | String holding the name of a bone in the pawn (or the pawn's weapon actor if present) acting as launch location. |
offsetX | Specifies the offset in x-direction (left) from the bone's orientation. |
offsetY | Specifies the offset in y-direction (up) from the bone's orientation. |
offsetZ | Specifies the offset in z-direction (in) from the bone's orientation. |
attribute | String holding the name of the attribute to damage. |
sound | String holding the name of the sound file to play while firing. |
void PawnHigh::AudibleRadius | ( | float | distance | ) |
Set the audible radius for all sounds played by this pawn's script to distance.
distance | float value specifying the audible radius (in texels). |
void PawnHigh::AddRandomSound | ( | int | soundID, |
float | minTime, | ||
float | maxTime, | ||
string | sound | ||
) |
Play back the given sound file at an interval that is randomly chosen between minTime and maxTime each time the sound is played.
soundID | integer value used to identify the sound for deletion. |
minTime | float value specifying the minimum time interval. |
maxTime | float value specifying the maximum time interval. |
sound | String holding the name of the sound file to play. |
void PawnHigh::DelRandomSound | ( | int | soundID | ) |
Remove the specified sound from the list of playing sounds.
soundID | integer value identifying the sound to remove. |
void PawnHigh::SoundLoop | ( | bool | flag | ) |
Set the looping behaviour of sounds played by this pawn's script.
flag |
|
void PawnHigh::ChangeMaterial | ( | string | section | ) |
Change the material on the pawn's actor according to the specified section of material.ini.
section | String holding the name of a section in the material.ini file. |
void PawnHigh::ChangeWeaponMaterial | ( | string | section | ) |
Change the material on the pawn's weapon actor according to the specified section of material.ini.
section | String holding the name of a section in the material.ini file. |
void PawnHigh::AddExplosion | ( | string | explosion, |
string | boneName, | ||
float | offsetX, | ||
float | offsetY, | ||
float | offsetZ | ||
) |
Attach an explosion effect predefined in explosion.ini to the specified actor bone.
Offset the attachment point from the bone by the amounts in (offsetX, offsetY, offsetZ).
explosion | String holding the name of a section in the explosion.ini file. |
boneName | String holding the name of a bone present in the pawn. |
offsetX | float value specifying the offset in x-direction. |
offsetY | float value specifying the offset in y-direction. |
offsetZ | float value specifying the offset in z-direction. |
void PawnHigh::FadeIn | ( | float | time, |
float | alpha | ||
) |
Increase the alpha of the actor (and any attached weapon) from its present value to alpha in time seconds.
The next action is executed only after the specified alpha value is reached.
time | float value specifying the time (in seconds) the fade will take. |
alpha | float value specifying the transparency of the actor with 0 being fully transparent and 255 being fully opaque. |
void PawnHigh::FadeOut | ( | float | time, |
float | alpha | ||
) |
Decrease the alpha of the actor (and any attached weapon) from its present value to alpha in time seconds.
The next action is executed only after the specified alpha value is reached.
time | float value specifying the time (in seconds) the fade will take. |
alpha | float value specifying the transparency of the actor with 0 being fully transparent and 255 being fully opaque. |
void PawnHigh::Console | ( | bool | flag | ) |
Set whether information about this pawn's script is displayed on the screen.
This includes any error messages generated at runtime.
flag |
|
void PawnHigh::debug | ( | var | variable | ) |
Output the contents of variable to the console window for this pawn, assuming the console is active.
Used to debug scripts that are not working correctly.
variable | Specifies any variable from the script and can be of any type (i.e. string, float, int or bool). |
void PawnHigh::LowLevel | ( | string | order | ) |
Switch script execution type from current high level methods to the low level C style programming.
order | String holding the name of the low level order that will be executed next. |
void PawnHigh::EndScript | ( | ) |
Stop the execution of the script (without removing the pawn's actor).
void PawnHigh::Conversation | ( | ) |
Initiate the pawn's conversation, if one is defined.
This is the same as if the player used the Use key on the pawn.
void PawnHigh::Conversation | ( | string | order | ) |
Initiate the pawn's conversation, if one is defined.
This is the same as if the player used the Use key on the pawn.
order | String holding the name of the order used as starting point for the conversation. |
void PawnHigh::Speak | ( | string | textSection, |
string | sound, | ||
float | textScrollSpeed, | ||
float | textDisplayTime | ||
) |
Show a text string and optionally play a sound at the pawn's position during a conversation. If not in a conversation, just play back the specified sound file.
textSection | String holding the name of a section in the conversation text file. |
sound | String holding the name of the sound file (WAV, OGG, MP3) in the dubbing directory to play (optional). |
textScrollSpeed | float value specifying the speed at which the individual letters of the text will be diplayed (optional). |
textDisplayTime | float value specifying the amount of time (in seconds) the text will be shown once it is completely displayed (optional). |
void PawnHigh::ShowTextDelay | ( | int | textID, |
string | szEntityName, | ||
string | animation, | ||
string | text, | ||
string | font, | ||
float | time, | ||
string | sound, | ||
int | x, | ||
int | y, | ||
string | align, | ||
float | alpha | ||
) |
Display the given text attached to an entity (Pawn, Attribute, StaticEntityProxy) or the player.
The text will move along with the entity keeping its relative position.
<CR>
can be used as a separator.textID | integer value used to identify this text object (0 - 19). |
szEntityName | String holding the name of the entity to attach the text to ("Player" to specify the player). Use an empty string ("" ) for absolute screen coordinates. |
animation | String holding the name of the animation the entity/player will play while the text is shown. If left empty ("" ) the previously active animation will continue. |
text | String holding the text to display. |
font | String specifying the font to use. |
time | float value specifying the number of seconds to wait before continuing to the next action. |
sound | String holding the name of a WAV file to play once while the text is displayed. (not implemented) |
x | integer value defining the relative or absolute x-position to draw the text on the screen. |
y | integer value defining the relative or absolute y-position to draw the text on the screen. |
align | String defining the alignment of the text relative to the origin of the entity/player ("left" , "right" , "center" ). |
alpha | float value specifying the transparency of the text with 0 being fully transparent and 255 being fully opaque. |
void PawnHigh::ShowText | ( | int | textID, |
string | szEntityName, | ||
string | animation, | ||
string | text, | ||
string | font, | ||
string | sound, | ||
int | x, | ||
int | y, | ||
string | align, | ||
float | alpha | ||
) |
Display the given text attached to an entity (Pawn, Attribute, StaticEntityProxy) or the player.
The text will move along with the entity keeping its relative position.
<CR>
can be used as a separator.textID | integer value used to identify this text object (0 - 19). |
szEntityName | String holding the name of the entity to attach the text to ("Player" to specify the player). Use an empty string ("" ) for absolute screen coordinates. |
animation | String holding the name of the animation the entity/player will play while the text is shown. If left empty ("" ) the previously active animation will continue. |
text | String holding the text to display. |
font | String specifying the font to use. |
sound | String holding the name of a WAV file to play once while the text is displayed. (not implemented) |
x | integer value defining the relative or absolute x-position to draw the text on the screen. |
y | integer value defining the relative or absolute y-position to draw the text on the screen. |
align | String defining the alignment of the text relative to the origin of the entity/player ("left" , "right" , "center" ). |
alpha | float value specifying the transparency of the text with 0 being fully transparent and 255 being fully opaque. |
void PawnHigh::RemoveText | ( | int | textID | ) |
Remove the text object with the ID textID displayed by the ShowText() or ShowTextDelay() method.
textID | integer value used to identify a text object (0 - 19). |
void PawnHigh::SetHudDraw | ( | bool | show | ) |
Show or hide the HUD.
show |
|
void PawnHigh::HideFromRadar | ( | bool | hide | ) |
Show or hide the pawn on the HUD radar screen.
hide |
|
void PawnHigh::MouseControlledPlayer | ( | bool | flag | ) |
Define whether the player can be controlled with the mouse or not.
flag |
|
void PawnHigh::SetKeyPause | ( | bool | pause | ) |
Pause or restore the keyboard control.
pause |
|
void PawnHigh::AllowUseKey | ( | bool | flag | ) |
Set the Use key control for this pawn.
flag |
|
void PawnHigh::AttachToActor | ( | string | slave, |
string | slaveBone, | ||
string | masterBone, | ||
float | offsetX, | ||
float | offsetY, | ||
float | offsetZ, | ||
float | angleX, | ||
float | angleY, | ||
float | angleZ | ||
) |
Attach the pawn named slave to this pawn's actor.
The actors are attached from the bone named slaveBone on the attaching actor to the bone named masterBone on this pawn's actor. The offsets are applied to the attachment point and are calculated in the direction the master actor is facing. The rotations are applied to the base rotation of the slave actor. The slave actor is initially aligned to face the same direction as the master actor, before the rotations are applied. If no rotations are applied to the slave actor via its script then it will rotate to follow the master actor's rotation. The slave actor will move with the master actor to maintain its attachment.
slave | String holding the name of the pawn to attach. |
slaveBone | String holding the name of a bone of the pawn's actor to be attached. |
masterBone | String holding the name of a bone of this pawn's actor. |
offsetX | float value specifying the offset in x-direction. |
offsetY | float value specifying the offset in y-direction. |
offsetZ | float value specifying the offset in z-direction. |
angleX | float value specifying the angle to rotate around the x-axis (in degrees). |
angleY | float value specifying the angle to rotate around the y-axis (in degrees). |
angleZ | float value specifying the angle to rotate around the z-axis (in degrees). |
void PawnHigh::DetachFromActor | ( | string | slave | ) |
Detach the specified pawn from its master.
slave | String holding the name of the attached pawn. |
void PawnHigh::AttachBlendActor | ( | string | slave, |
string | master = self.EntityName |
||
) |
Attach the specified entity to the given master entity.
The attached actor will use the same animation as its master.
slave | String holding the name of the entity to attach. |
master | String holding the name of the master entity. |
void PawnHigh::DetachBlendActor | ( | string | slave, |
string | master = self.EntityName |
||
) |
Detach the specified entity from its master.
slave | String holding the name of the attached entity. |
master | String holding the name of the master entity. |
void PawnHigh::AttachAccessory | ( | string | slave, |
string | master = self.EntityName |
||
) |
Attach the specified accessory to the given master entity.
The attached actor will use the same animation as its master.
slave | String holding the name of the accessory to attach as defined in the pawn.ini file. |
master | String holding the name of the master entity. |
void PawnHigh::DetachAccessory | ( | string | slave, |
string | master = self.EntityName |
||
) |
Detach the specified accessory from its master.
slave | String holding the name of the attached accessory as defined in the pawn.ini file. |
master | String holding the name of the master entity. |
int PawnHigh::random | ( | int | lower, |
int | upper | ||
) |
Generate a random integer number in the range lower to upper.
lower | Specifies the lower limit of the random number. |
upper | Specifies the upper limit of the random number. |
float PawnHigh::sin | ( | float | value | ) |
Get the sine of the given value.
value | float value to calculate the sine of (in radians). |
float PawnHigh::cos | ( | float | value | ) |
Get the cosine of the given value.
value | float value to calculate the cosine of (in radians). |
float PawnHigh::tan | ( | float | value | ) |
Get the tangent of the given value.
value | float value to calculate the tangent of (in radians). |
float PawnHigh::asin | ( | float | value | ) |
Get the arc sine of the given value.
value | float value to calculate the arc sine of. |
float PawnHigh::acos | ( | float | value | ) |
Get the arc cosine of the given value.
value | float value to calculate the arc cosine of. |
float PawnHigh::atan | ( | float | value | ) |
Get the arc tangent of the given value.
value | float value to calculate the arc tangent of. |