Contents

Detailed Description

Defines properties for a Player object.

See also:
Player

Member Function Documentation

void PlayerData::animationDone ( Player  obj  ) 

Called on the server when a scripted animation completes.

Parameters:
obj The Player object
See also:
Player::setActionThread() for setting a scripted animation and its 'hold' parameter to determine if this callback is used.
void PlayerData::doDismount ( Player  obj  ) 

Called when attempting to dismount the player from a vehicle.

It is up to the doDismount() method to actually perform the dismount. Often there are some conditions that prevent this, such as the vehicle moving too fast.

Parameters:
obj The Player object
void PlayerData::onEnterLiquid ( Player  obj,
float  coverage,
string  type 
)

Called when the player enters a liquid.

Parameters:
obj The Player object
coverage Percentage of the player's bounding box covered by the liquid
type The type of liquid the player has entered
void PlayerData::onEnterMissionArea ( Player  obj  ) 

Called when the player enters the mission area.

Parameters:
obj The Player object
See also:
MissionArea
void PlayerData::onLeaveLiquid ( Player  obj,
string  type 
)

Called when the player leaves a liquid.

Parameters:
obj The Player object
type The type of liquid the player has left
void PlayerData::onLeaveMissionArea ( Player  obj  ) 

Called when the player leaves the mission area.

Parameters:
obj The Player object
See also:
MissionArea
void PlayerData::onPoseChange ( Player  obj,
string  oldPose,
string  newPose 
)

Called when the player changes poses.

Parameters:
obj The Player object
oldPose The pose the player is switching from.
newPose The pose the player is switching to.
void PlayerData::onStartSprintMotion ( Player  obj  ) 

Called when the player starts moving while in a Sprint pose.

Parameters:
obj The Player object
void PlayerData::onStartSwim ( Player  obj  ) 

Called when the player starts swimming.

Parameters:
obj The Player object
void PlayerData::onStopSprintMotion ( Player  obj  ) 

Called when the player stops moving while in a Sprint pose.

Parameters:
obj The Player object
void PlayerData::onStopSwim ( Player  obj  ) 

Called when the player stops swimming.

Parameters:
obj The Player object

Member Data Documentation

Amount of movement control the player has when in the air.

This is applied as a multiplier to the player's x and y motion.

Allow mounted images to request a sequence be played on the Player.

When true a new thread is added to the player to allow for mounted images to request a sequence be played on the player through the image's state machine. It is only optional so that we don't create a TSThread on the player if we don't need to.

Size of the bounding box used by the player for collision.

Dimensions are given as "width depth height".

Percentage of the player's bounding box depth that represents the back side of the head.

Used when computing the damage location.

See also:
Player::getDamageLocation

Percentage of the player's bounding box depth that represents the front side of the head.

Used when computing the damage location.

See also:
Player::getDamageLocation

Percentage of the player's bounding box width that represents the left side of the head.

Used when computing the damage location.

See also:
Player::getDamageLocation

Percentage of the player's bounding box height that represents the head.

Used when computing the damage location.

See also:
Player::getDamageLocation

Percentage of the player's bounding box width that represents the right side of the head.

Used when computing the damage location.

See also:
Player::getDamageLocation

Percentage of the player's bounding box height that represents the torso.

Used when computing the damage location.

See also:
Player::getDamageLocation

Time in seconds to generate bubble particles after entering the water.

Collision bounding box used when the player is crouching.

See also:
boundingBox

Force used to accelerate the player when crouching.

Decal to place on the ground for player footsteps.

Distance from the center of the model to the right foot.

While this defines the distance to the right foot, it is also used to place the left foot decal as well. Just on the opposite side of the player.

Emitter used to generate dust particles.

Note:
Currently unused.

Sound to play when exiting the water with velocity >= exitSplashSoundVelocity.

See also:
exitSplashSoundVelocity

Minimum velocity when leaving the water for the exitingWater sound to play.

See also:
exitingWater

Downward speed at which we consider the player falling.

Sound to play when walking in water and coverage equals 1.0 (fully underwater).

Sound to play when walking on a surface with Material footstepSoundId 1.

Sound to play when walking on a surface with Material footstepSoundId 2.

Particle emitter used to generate footpuffs (particles created as the player walks along the ground).

Note:
The generation of foot puffs requires the appropriate triggeres to be defined in the player's animation sequences. Without these, no foot puffs will be generated.

Number of footpuff particles to generate each step.

Each foot puff is randomly placed within the defined foot puff radius. This includes having footPuffNumParts set to one.

See also:
footPuffRadius

Particle creation radius for footpuff particles.

This is applied to each foot puff particle, even if footPuffNumParts is set to one. So set this value to zero if you want a single foot puff placed at exactly the same location under the player each time.

Sound to play when walking in water and coverage is less than footSplashHeight.

See also:
footSplashHeight

Sound to play when walking on a surface with Material footstepSoundId 3.

Sound to play when walking on a surface with Material footstepSoundId 0.

Water coverage level to choose between FootShallowSound and FootWadingSound.

See also:
FootShallowSound
FootWadingSound

Sound to play when walking in water and coverage equals 1.0 (fully underwater).

Sound to play when walking in water and coverage is less than 1, but > footSplashHeight.

See also:
footSplashHeight

Minimum falling impact speed to apply damage and initiate the camera shaking effect.

Amplitude of the camera shake effect after falling.

This is how much to shake the camera.

Duration (in seconds) of the camera shake effect after falling.

This is how long to shake the camera.

Falloff factor of the camera shake effect after falling.

This is how to fade the camera shake over the duration.

Frequency of the camera shake effect after falling.

This is how fast to shake the camera.

Minimum velocity when entering the water for choosing between the impactWaterMedium and impactWaterHard sound to play.

See also:
impactWaterMedium
impactWaterHard

Maximum horizontal speed.

Note:
This limit is only enforced if the player's horizontal speed exceeds horizResistSpeed.
See also:
horizResistSpeed
horizResistFactor

Factor of resistence once horizResistSpeed has been reached.

See also:
horizMaxSpeed
horizResistSpeed

Horizontal speed at which resistence will take place.

See also:
horizMaxSpeed
horizResistFactor

Optional prefix to all mounted image animation sequences in third person.

This defines a prefix that will be added when looking up mounted image animation sequences while in third person. It allows for the customization of a third person image based on the type of player.

Optional prefix to all mounted image animation sequences in first person.

This defines a prefix that will be added when looking up mounted image animation sequences while in first person. It allows for the customization of a first person image based on the type of player.

Sound to play after falling on a surface with Material footstepSoundId 1.

Sound to play after falling on a surface with Material footstepSoundId 2.

Sound to play after falling on a surface with Material footstepSoundId 3.

Sound to play after falling on a surface with Material footstepSoundId 0.

Sound to play when entering the water with velocity < mediumSplashSoundVelocity.

See also:
mediumSplashSoundVelocity

Sound to play when entering the water with velocity >= hardSplashSoundVelocity.

See also:
hardSplashSoundVelocity

Sound to play when entering the water with velocity >= mediumSplashSoundVelocity and < hardSplashSoundVelocity.

See also:
mediumSplashSoundVelocity
hardSplashSoundVelocity

Energy level drained each time the player jet jumps.

Note:
Setting this to zero will disable any energy drain
See also:
jetMinJumpEnergy

Force used to accelerate the player when a jet jump is initiated.

Angle from vertical (in degrees) where the player can jet jump.

Maximum vertical speed before the player can no longer jet jump.

Minimum energy level required to jet jump.

See also:
jetJumpEnergyDrain

Minimum speed needed to jet jump.

If the player's own z velocity is greater than this, then it is used to scale the jet jump speed, up to jetMaxJumpSpeed.

See also:
jetMaxJumpSpeed

Delay time in number of ticks ticks between jumps.

Energy level drained each time the player jumps.

Note:
Setting this to zero will disable any energy drain
See also:
minJumpEnergy

Force used to accelerate the player when a jump is initiated.

Angle from vertical (in degrees) where the player can jump.

Controls the direction of the jump impulse.

When false, jumps are always in the vertical (+Z) direction. When true jumps are in the direction of the ground normal so long as the player is not directly facing the surface. If the player is directly facing the surface, then they will jump straight up.

Time of land sequence play back when using new recover system.

If greater than 0 then the legacy fall recovery system will be bypassed in favour of just playing the player's land sequence. The time to recover from a fall then becomes this parameter's time and the land sequence's playback will be scaled to match.

See also:
transitionToLand

Maximum backward speed when running.

Maximum backward speed when crouching.

Maximum forward speed when crouching.

Maximum sideways speed when crouching.

Maximum forward speed when running.

Defines the maximum left and right angles (in radians) the player can look in freelook mode.

Maximum vertical speed before the player can no longer jump.

Highest angle (in radians) the player can look.

Note:
An angle of zero is straight ahead, with positive up and negative down.

Maximum backward speed when prone (laying down).

Maximum forward speed when prone (laying down).

Maximum sideways speed when prone (laying down).

Maximum sideways speed when running.

Maximum backward speed when sprinting.

Maximum forward speed when sprinting.

Maximum sideways speed when sprinting.

Maximum height the player can step up.

The player will automatically step onto changes in ground height less than maxStepHeight. The player will collide with ground height changes greater than this.

Maximum time scale for action animations.

If an action animation has a defined ground frame, it is automatically scaled to match the player's ground velocity. This field limits the maximum time scale used even if the player's velocity exceeds it.

Maximum backward speed when underwater.

Maximum forward speed when underwater.

Maximum sideways speed when underwater.

Minimum velocity when entering the water for choosing between the impactWaterEasy and impactWaterMedium sounds to play.

See also:
impactWaterEasy
impactWaterMedium

Minimum impact speed to apply falling damage.

This field also sets the minimum speed for the onImpact callback to be invoked.

See also:
ShapeBaseData::onImpact()

Minimum energy level required to jump.

See also:
jumpEnergyDrain

Minimum speed needed to jump.

If the player's own z velocity is greater than this, then it is used to scale the jump speed, up to maxJumpSpeed.

See also:
maxJumpSpeed

Minimum impact speed to apply non-falling damage.

This field also sets the minimum speed for the onLateralImpact callback to be invoked.

See also:
ShapeBaseData::onLateralImpact()

Lowest angle (in radians) the player can look.

Note:
An angle of zero is straight ahead, with positive up and negative down.

Minimum energy level required to run or swim.

See also:
runEnergyDrain

Minimum energy level required to sprint.

See also:
sprintEnergyDrain

Sound to play when in water and coverage equals 1.0 (fully underwater).

Note that unlike FootUnderwaterSound, this sound plays even if the player is not moving around in the water.

Specifies the type of physics used by the player.

This depends on the physics module used. An example is 'Capsule'.

Note:
Not current used.

Radius around the player to collide with Items in the scene (on server).

Internally the pickupRadius is added to the larger side of the initial bounding box to determine the actual distance, to a maximum of 2 times the bounding box size. The initial bounding box is that used for the root pose, and therefore doesn't take into account the change in pose.

Collision bounding box used when the player is prone (laying down).

See also:
boundingBox

Force used to accelerate the player when prone (laying down).

Number of ticks for the player to recover from falling.

Scale factor applied to runForce while in the recover state.

This can be used to temporarily slow the player's movement after a fall, or prevent the player from moving at all if set to zero.

Flag controlling whether to render the player shape in first person view.

Energy value drained each tick that the player is moving.

The player will not be able to move when his energy falls below minRunEnergy.

Note:
Setting this to zero will disable any energy drain.
See also:
minRunEnergy

Force used to accelerate the player when running.

Maximum angle from vertical (in degrees) the player can run up.

File name of this player's shape that will be used in conjunction with the corresponding mounted image.

These optional parameters correspond to each mounted image slot to indicate a shape that is rendered in addition to the mounted image shape. Typically these are a player's arms (or arm) that is animated along with the mounted image's state animation sequences.

SplashData datablock used to create splashes when the player moves through water.

Maximum angle (in degrees) from pure vertical movement in water to generate splashes.

Particle emitters used to generate splash particles.

Multipled by speed to determine the number of splash particles to generate.

Minimum speed to generate splash particles.

Minimum velocity when moving through water to generate splashes.

Can the player jump while sprinting.

Energy value drained each tick that the player is sprinting.

The player will not be able to move when his energy falls below sprintEnergyDrain.

Note:
Setting this to zero will disable any energy drain.
See also:
minSprintEnergy

Force used to accelerate the player when sprinting.

Amount to scale pitch motion while sprinting.

Amount to scale strafing motion vector while sprinting.

Amount to scale yaw motion while sprinting.

Collision bounding box used when the player is swimming.

See also:
boundingBox

Force used to accelerate the player when swimming.

When going from a fall to a land, should we transition between the two.

Note:
Only takes affect when landSequenceTime is greater than 0.
See also:
landSequenceTime

Maximum upwards speed.

Note:
This limit is only enforced if the player's upward speed exceeds upResistSpeed.
See also:
upResistSpeed
upResistFactor

Factor of resistence once upResistSpeed has been reached.

See also:
upMaxSpeed
upResistSpeed

Upwards speed at which resistence will take place.

See also:
upMaxSpeed
upResistFactor

Sound to play when in water and coverage equals 1.0 (fully underwater).

Note that unlike FootUnderwaterSound, this sound plays even if the player is not moving around in the water.