DayZ Scripts
PC Stable Documentation
 
Loading...
Searching...
No Matches
Human Class Reference

Private Member Functions

proto native void GetTransformWS (out vector pTm[4])
 world space - local space - heading space
 
proto native void PhysicsGetTransformWS (out vector pTm[4])
 
proto native void PhysicsGetTransformLS (out vector pTm[4])
 gets human transform in local space to parent/linked
 
proto native vector PhysicsGetPositionWS ()
 
proto native vector PhysicsGetPositionLS ()
 gets human position in local space to parent/linked
 
proto native bool CheckFreeSpace (vector localDir, float distance, bool useHeading, vector posOffset=vector.Zero, float xzScale=1.0)
 makes test if there's enough space for character's collider assuming that character can be pushed away from obstacle - usable for checking if character is in some tight space
 
proto float CollisionMoveTest (vector dir, vector offset, float xzScale, IEntity ignoreEntity, out IEntity hitEntity, out vector hitPosition, out vector hitNormal)
 makes test if character can physically move in given world space direction - length of dir means distance, returns distance fraction
 
proto native void LinkToLocalSpaceOf (notnull IEntity child, vector pLocalSpaceMatrix[4])
 
proto native void UnlinkFromLocalSpace ()
 
proto native void AlignPositionWS (vector position)
 smoothly move the player to the target position - do not handle replay, performed internally
 
proto native void AlignTranslationWS (vector translation)
 adds the translation to the current position and then calls AlignPositionWS - do not handle replay, performed internally
 
proto native void AlignTranslationLS (vector translation)
 adds the translation to the current position in heading space and then calls AlignPositionWS - do not handle replay, performed internally
 
proto native void AlignDirectionWS (vector direction)
 smoothly move the player to face the target direction - do not handle replay, performed internally
 
void OnPhysMove (float dt, vector transform[4])
 
proto native int GetBoneIndexByName (string pBoneName)
 returns bone index for a name (-1 if pBoneName doesn't exist)
 
proto native HumanAnimInterface GetAnimInterface ()
 returns animation interface - usable in HumanCommandScript implementations
 
proto native bool PhysicsIsFalling (bool pValidate)
 returns true if physics controller is falling
 
proto native IEntity PhysicsGetFloorEntity ()
 entity below us
 
proto native IEntity PhysicsGetLinkedEntity ()
 entity we are linked to (not valid when IEntity.GetParent() returns some entity)
 
proto native bool PhysicsWasSlidingOffLinkedEntity ()
 
proto native void PhysicsGetVelocity (out vector pVelocity)
 outs pVelocity - linear velocity of PHYSICS CONTROLLER
 
proto native void PhysicsEnableGravity (bool pEnable)
 
proto native bool PhysicsIsSolid ()
 
proto native void PhysicsSetSolid (bool pSolid)
 
proto native void PhysicsSetRagdoll (bool pEnable)
 Sets and synchronize interaction layers 'RAGDOLL' and 'RAGDOLL_NO_CHARACTER' to prevent body stacking and players going through dead creatures.
 
proto native HumanInputController GetInputController ()
 returns human input controller
 
proto native HumanItemAccessor GetItemAccessor ()
 
proto native void GetMovementState (HumanMovementState pState)
 returns movement state (current command id, )
 
proto native int GetCurrentCommandID ()
 returns current command ID (see DayZPlayerConstants.COMMANDID_...)
 
proto native HumanCommandMove StartCommand_Move ()
 --— MOVE --—
 
proto native HumanCommandMove GetCommand_Move ()
 
proto native HumanCommandMelee StartCommand_Melee (EntityAI pTarget)
 --— MELEE --—
 
proto native HumanCommandMelee GetCommand_Melee ()
 
proto native HumanCommandMelee2 StartCommand_Melee2 (EntityAI pTarget, int pHitType, float pComboValue, vector hitPos=vector.Zero)
 starts command - melee2
 
proto native HumanCommandMelee2 GetCommand_Melee2 ()
 
proto native HumanCommandFall StartCommand_Fall (float pYVelocity)
 --— FALL --—
 
proto native HumanCommandFall GetCommand_Fall ()
 
proto native HumanCommandLadder StartCommand_Ladder (Building pBuilding, int pLadderIndex)
 --— LADDER --—
 
proto native HumanCommandLadder GetCommand_Ladder ()
 
proto native HumanCommandSwim StartCommand_Swim ()
 --— LADDER --—
 
proto native HumanCommandSwim GetCommand_Swim ()
 
proto native HumanCommandVehicle StartCommand_Vehicle (Transport pTransport, int pTransportPositionIndex, int pVehicleSeat, bool fromUnconscious=false)
 --— VEHICLE --—
 
proto native HumanCommandVehicle GetCommand_Vehicle ()
 
proto native HumanCommandClimb StartCommand_Climb (SHumanCommandClimbResult pClimbResult, int pType)
 --— CLIMB --—
 
proto native HumanCommandClimb GetCommand_Climb ()
 
proto native HumanCommandDeathCallback StartCommand_Death (int pType, float pDirection, typename pCallbackClass, bool pKeepInLocalSpaceAfterLeave=false)
 --— Death --—
 
proto native HumanCommandDeathCallback GetCommand_Death ()
 
proto native HumanCommandUnconscious StartCommand_Unconscious (float pType)
 starts command - unconscious
 
proto native HumanCommandUnconscious GetCommand_Unconscious ()
 
proto native HumanCommandFullBodyDamage StartCommand_Damage (int pType, float pDirection)
 --— FullBody Damages --—
 
proto native HumanCommandFullBodyDamage GetCommand_Damage ()
 
proto native HumanCommandActionCallback StartCommand_Action (int pActionID, typename pCallbackClass, int pStanceMask)
 --— ACTIONS --—
 
proto native HumanCommandActionCallback GetCommand_Action ()
 is human is in command action - returns its callback, if current command is action
 
proto native int GetCommandModifierCount ()
 
proto native int GetCommandModifierID (int pIndex)
 returns COMMANDID_ .. type id of command modifier on index pIndex
 
proto native HumanCommandAdditives GetCommandModifier_Additives ()
 default (always-on modifiers)
 
proto native HumanCommandWeapons GetCommandModifier_Weapons ()
 returns interface for handling weapons
 
proto native HumanCommandActionCallback AddCommandModifier_Action (int pActionID, typename pCallbackClass)
 adds action command modifier, creates callback instance for you
 
proto native void DeleteCommandModifier_Action (HumanCommandActionCallback pCallback)
 force remove - normally if action is ended or interrupted - this is not needed to call
 
proto native HumanCommandActionCallback GetCommandModifier_Action ()
 returns callback for action if any is active, null if nothing runs
 
proto native HumanCommandDamage AddCommandModifier_Damage (int pType, float pDirection)
 — modifier for light Damages
 
proto native void DeleteCommandModifier_Damage (HumanCommandDamage pDamage)
 
proto native HumanCommandDamage GetCommandModifier_Damage ()
 
proto native HumanCommandScript StartCommand_Script (HumanCommandScript pHumanCommand)
 — SCRIPTED COMMANDS
 
proto native HumanCommandScript StartCommand_ScriptInst (typename pCallbackClass)
 
proto native HumanCommandScript GetCommand_Script ()
 is human is in command action - returns its callback, if current command is action
 
proto native owned string DebugGetItemClass ()
 returns current item's class name
 
proto native owned string DebugGetItemSuperClass ()
 returns current item's class that is found in config
 
proto native owned string DebugGetItemAnimInstance ()
 returns current item's animation instance
 
proto native void StartDeath ()
 
proto native void ResetDeath ()
 
proto native void ResetDeathCooldown ()
 
proto native bool IsDeathProcessed ()
 
proto native bool IsDeathConditionMet ()
 
void OnCommandMoveStart ()
 
void OnCommandMoveFinish ()
 
void OnCommandMeleeStart ()
 
void OnCommandMeleeFinish ()
 
void OnCommandMelee2Start ()
 
void OnCommandMelee2Finish ()
 
void OnCommandFallStart ()
 
void OnCommandFallFinish ()
 
void OnCommandClimbStart ()
 
void OnCommandClimbFinish ()
 
void OnCommandDeathStart ()
 
void OnCommandDeathFinish ()
 
void OnCommandUnconsciousStart ()
 
void OnCommandUnconsciousFinish ()
 
void OnCommandDamageFullbodyStart ()
 
void OnCommandDamageFullbodyFinish ()
 
void OnCommandDamageAdditiveStart ()
 
void OnCommandDamageAdditiveFinish ()
 
void OnCommandLadderStart ()
 
void OnCommandLadderFinish ()
 
void OnCommandSwimStart ()
 
void OnCommandSwimFinish ()
 
void OnCommandVehicleStart ()
 
void OnCommandVehicleFinish ()
 
void OnCommandActionFullbodyStart ()
 
void OnCommandActionFullbodyFinish ()
 
void OnCommandActionAdditiveStart ()
 
void OnCommandActionAdditiveFinish ()
 
void OnStanceChange (int previousStance, int newStance)
 gets called on stance change
 
bool CanChangeStance (int previousStance, int newStance)
 Called by code to see if it can.
 
bool CanRoll ()
 
void OnRollStart (bool isToTheRight)
 
void OnRollFinish ()
 
void OnVehicleSeatDriverEnter ()
 
void OnVehicleSeatDriverLeft ()
 
proto native bool IsControllingVehicle ()
 

Member Function Documentation

◆ AddCommandModifier_Action()

proto native HumanCommandActionCallback AddCommandModifier_Action ( int  pActionID,
typename pCallbackClass   
)
private

adds action command modifier, creates callback instance for you

◆ AddCommandModifier_Damage()

proto native HumanCommandDamage AddCommandModifier_Damage ( int  pType,
float  pDirection 
)
private

— modifier for light Damages

starts additive damage

◆ AlignDirectionWS()

proto native void AlignDirectionWS ( vector  direction)
private

smoothly move the player to face the target direction - do not handle replay, performed internally

◆ AlignPositionWS()

proto native void AlignPositionWS ( vector  position)
private

smoothly move the player to the target position - do not handle replay, performed internally

◆ AlignTranslationLS()

proto native void AlignTranslationLS ( vector  translation)
private

adds the translation to the current position in heading space and then calls AlignPositionWS - do not handle replay, performed internally

◆ AlignTranslationWS()

proto native void AlignTranslationWS ( vector  translation)
private

adds the translation to the current position and then calls AlignPositionWS - do not handle replay, performed internally

◆ CanChangeStance()

bool CanChangeStance ( int  previousStance,
int  newStance 
)
private

Called by code to see if it can.

◆ CanRoll()

bool CanRoll ( )
private

◆ CheckFreeSpace()

proto native bool CheckFreeSpace ( vector  localDir,
float  distance,
bool  useHeading,
vector  posOffset = vector.Zero,
float  xzScale = 1.0 
)
private

makes test if there's enough space for character's collider assuming that character can be pushed away from obstacle - usable for checking if character is in some tight space

◆ CollisionMoveTest()

proto float CollisionMoveTest ( vector  dir,
vector  offset,
float  xzScale,
IEntity  ignoreEntity,
out IEntity  hitEntity,
out vector  hitPosition,
out vector  hitNormal 
)
private

makes test if character can physically move in given world space direction - length of dir means distance, returns distance fraction

◆ DebugGetItemAnimInstance()

proto native owned string DebugGetItemAnimInstance ( )
private

returns current item's animation instance

◆ DebugGetItemClass()

proto native owned string DebugGetItemClass ( )
private

returns current item's class name

◆ DebugGetItemSuperClass()

proto native owned string DebugGetItemSuperClass ( )
private

returns current item's class that is found in config

◆ DeleteCommandModifier_Action()

proto native void DeleteCommandModifier_Action ( HumanCommandActionCallback  pCallback)
private

force remove - normally if action is ended or interrupted - this is not needed to call

◆ DeleteCommandModifier_Damage()

proto native void DeleteCommandModifier_Damage ( HumanCommandDamage  pDamage)
private

◆ GetAnimInterface()

proto native HumanAnimInterface GetAnimInterface ( )
private

returns animation interface - usable in HumanCommandScript implementations

◆ GetBoneIndexByName()

proto native int GetBoneIndexByName ( string  pBoneName)
private

returns bone index for a name (-1 if pBoneName doesn't exist)

Referenced by EntityPlacementCallback::OnSetup().

◆ GetCommand_Action()

proto native HumanCommandActionCallback GetCommand_Action ( )
private

is human is in command action - returns its callback, if current command is action

◆ GetCommand_Climb()

proto native HumanCommandClimb GetCommand_Climb ( )
private

◆ GetCommand_Damage()

proto native HumanCommandFullBodyDamage GetCommand_Damage ( )
private

◆ GetCommand_Death()

proto native HumanCommandDeathCallback GetCommand_Death ( )
private

◆ GetCommand_Fall()

proto native HumanCommandFall GetCommand_Fall ( )
private

◆ GetCommand_Ladder()

proto native HumanCommandLadder GetCommand_Ladder ( )
private

◆ GetCommand_Melee()

proto native HumanCommandMelee GetCommand_Melee ( )
private

◆ GetCommand_Melee2()

proto native HumanCommandMelee2 GetCommand_Melee2 ( )
private

◆ GetCommand_Move()

proto native HumanCommandMove GetCommand_Move ( )
private

◆ GetCommand_Script()

proto native HumanCommandScript GetCommand_Script ( )
private

is human is in command action - returns its callback, if current command is action

◆ GetCommand_Swim()

proto native HumanCommandSwim GetCommand_Swim ( )
private

◆ GetCommand_Unconscious()

proto native HumanCommandUnconscious GetCommand_Unconscious ( )
private

◆ GetCommand_Vehicle()

proto native HumanCommandVehicle GetCommand_Vehicle ( )
private

◆ GetCommandModifier_Action()

proto native HumanCommandActionCallback GetCommandModifier_Action ( )
private

returns callback for action if any is active, null if nothing runs

◆ GetCommandModifier_Additives()

proto native HumanCommandAdditives GetCommandModifier_Additives ( )
private

default (always-on modifiers)

returns modifier for additives / small behaviours on human

◆ GetCommandModifier_Damage()

proto native HumanCommandDamage GetCommandModifier_Damage ( )
private

◆ GetCommandModifier_Weapons()

proto native HumanCommandWeapons GetCommandModifier_Weapons ( )
private

returns interface for handling weapons

◆ GetCommandModifierCount()

proto native int GetCommandModifierCount ( )
private

◆ GetCommandModifierID()

proto native int GetCommandModifierID ( int  pIndex)
private

returns COMMANDID_ .. type id of command modifier on index pIndex

◆ GetCurrentCommandID()

proto native int GetCurrentCommandID ( )
private

returns current command ID (see DayZPlayerConstants.COMMANDID_...)

◆ GetInputController()

proto native HumanInputController GetInputController ( )
private

returns human input controller

Referenced by EntityPlacementCallback::OnSetup().

◆ GetItemAccessor()

proto native HumanItemAccessor GetItemAccessor ( )
private

◆ GetMovementState()

proto native void GetMovementState ( HumanMovementState  pState)
private

returns movement state (current command id, )

◆ GetTransformWS()

proto native void GetTransformWS ( out vector  pTm[4])
private

world space - local space - heading space

Deprecated: replaced with 'PhysicsGetTransformLS', which is local space transform

◆ IsControllingVehicle()

proto native bool IsControllingVehicle ( )
private

Referenced by Car::OnUpdate().

◆ IsDeathConditionMet()

proto native bool IsDeathConditionMet ( )
private

◆ IsDeathProcessed()

proto native bool IsDeathProcessed ( )
private

◆ LinkToLocalSpaceOf()

proto native void LinkToLocalSpaceOf ( notnull IEntity  child,
vector  pLocalSpaceMatrix[4] 
)
private

◆ OnCommandActionAdditiveFinish()

void OnCommandActionAdditiveFinish ( )
private

◆ OnCommandActionAdditiveStart()

void OnCommandActionAdditiveStart ( )
private

◆ OnCommandActionFullbodyFinish()

void OnCommandActionFullbodyFinish ( )
private

◆ OnCommandActionFullbodyStart()

void OnCommandActionFullbodyStart ( )
private

◆ OnCommandClimbFinish()

void OnCommandClimbFinish ( )
private

◆ OnCommandClimbStart()

void OnCommandClimbStart ( )
private

◆ OnCommandDamageAdditiveFinish()

void OnCommandDamageAdditiveFinish ( )
private

◆ OnCommandDamageAdditiveStart()

void OnCommandDamageAdditiveStart ( )
private

◆ OnCommandDamageFullbodyFinish()

void OnCommandDamageFullbodyFinish ( )
private

◆ OnCommandDamageFullbodyStart()

void OnCommandDamageFullbodyStart ( )
private

◆ OnCommandDeathFinish()

void OnCommandDeathFinish ( )
private

◆ OnCommandDeathStart()

void OnCommandDeathStart ( )
private

◆ OnCommandFallFinish()

void OnCommandFallFinish ( )
private

◆ OnCommandFallStart()

void OnCommandFallStart ( )
private

◆ OnCommandLadderFinish()

void OnCommandLadderFinish ( )
private

◆ OnCommandLadderStart()

void OnCommandLadderStart ( )
private

◆ OnCommandMelee2Finish()

void OnCommandMelee2Finish ( )
private

◆ OnCommandMelee2Start()

void OnCommandMelee2Start ( )
private

◆ OnCommandMeleeFinish()

void OnCommandMeleeFinish ( )
private

◆ OnCommandMeleeStart()

void OnCommandMeleeStart ( )
private

◆ OnCommandMoveFinish()

void OnCommandMoveFinish ( )
private

◆ OnCommandMoveStart()

void OnCommandMoveStart ( )
private

◆ OnCommandSwimFinish()

void OnCommandSwimFinish ( )
private

◆ OnCommandSwimStart()

void OnCommandSwimStart ( )
private

◆ OnCommandUnconsciousFinish()

void OnCommandUnconsciousFinish ( )
private

◆ OnCommandUnconsciousStart()

void OnCommandUnconsciousStart ( )
private

◆ OnCommandVehicleFinish()

void OnCommandVehicleFinish ( )
private

◆ OnCommandVehicleStart()

void OnCommandVehicleStart ( )
private

◆ OnPhysMove()

void OnPhysMove ( float  dt,
vector  transform[4] 
)
inlineprivate

callback before the transform is finalized, after PrePhys, called before alignment is applied

  • important to ensure state is saved as this function gets replayed on correction

◆ OnRollFinish()

void OnRollFinish ( )
private

◆ OnRollStart()

void OnRollStart ( bool  isToTheRight)
private

◆ OnStanceChange()

void OnStanceChange ( int  previousStance,
int  newStance 
)
private

gets called on stance change

◆ OnVehicleSeatDriverEnter()

void OnVehicleSeatDriverEnter ( )
private

◆ OnVehicleSeatDriverLeft()

void OnVehicleSeatDriverLeft ( )
private

◆ PhysicsEnableGravity()

proto native void PhysicsEnableGravity ( bool  pEnable)
private

◆ PhysicsGetFloorEntity()

proto native IEntity PhysicsGetFloorEntity ( )
private

entity below us

◆ PhysicsGetLinkedEntity()

proto native IEntity PhysicsGetLinkedEntity ( )
private

entity we are linked to (not valid when IEntity.GetParent() returns some entity)

Referenced by Entity::RegisterTransportHit().

◆ PhysicsGetPositionLS()

proto native vector PhysicsGetPositionLS ( )
private

gets human position in local space to parent/linked

◆ PhysicsGetPositionWS()

proto native vector PhysicsGetPositionWS ( )
private

gets human position in world space Note: Value is not cached and it is recomputed every call if there is some parent

◆ PhysicsGetTransformLS()

proto native void PhysicsGetTransformLS ( out vector  pTm[4])
private

gets human transform in local space to parent/linked

◆ PhysicsGetTransformWS()

proto native void PhysicsGetTransformWS ( out vector  pTm[4])
private

gets human transform in world space Note: Value is not cached and it is recomputed every call if there is some parent

◆ PhysicsGetVelocity()

proto native void PhysicsGetVelocity ( out vector  pVelocity)
private

outs pVelocity - linear velocity of PHYSICS CONTROLLER

◆ PhysicsIsFalling()

proto native bool PhysicsIsFalling ( bool  pValidate)
private

returns true if physics controller is falling

◆ PhysicsIsSolid()

proto native bool PhysicsIsSolid ( )
private

◆ PhysicsSetRagdoll()

proto native void PhysicsSetRagdoll ( bool  pEnable)
private

Sets and synchronize interaction layers 'RAGDOLL' and 'RAGDOLL_NO_CHARACTER' to prevent body stacking and players going through dead creatures.

◆ PhysicsSetSolid()

proto native void PhysicsSetSolid ( bool  pSolid)
private

◆ PhysicsWasSlidingOffLinkedEntity()

proto native bool PhysicsWasSlidingOffLinkedEntity ( )
private

if the entity we are on was moving faster than it's defined config 'animPhysDetachSpeed' value It is the result of the previous keyframe after physics move has been performed

◆ ResetDeath()

proto native void ResetDeath ( )
private

◆ ResetDeathCooldown()

proto native void ResetDeathCooldown ( )
private

◆ StartCommand_Action()

proto native HumanCommandActionCallback StartCommand_Action ( int  pActionID,
typename pCallbackClass  ,
int  pStanceMask 
)
private

--— ACTIONS --—

starts command - Action pStanceMask is mix of flags STANCEMASK_ERECT, ...

◆ StartCommand_Climb()

proto native HumanCommandClimb StartCommand_Climb ( SHumanCommandClimbResult  pClimbResult,
int  pType 
)
private

--— CLIMB --—

starts command - climb

◆ StartCommand_Damage()

proto native HumanCommandFullBodyDamage StartCommand_Damage ( int  pType,
float  pDirection 
)
private

--— FullBody Damages --—

starts fullbody damage

◆ StartCommand_Death()

proto native HumanCommandDeathCallback StartCommand_Death ( int  pType,
float  pDirection,
typename pCallbackClass  ,
bool  pKeepInLocalSpaceAfterLeave = false 
)
private

--— Death --—

starts command - death

◆ StartCommand_Fall()

proto native HumanCommandFall StartCommand_Fall ( float  pYVelocity)
private

--— FALL --—

starts command - fall pYVelocity <= 0 -> fall pYVelocity > 0 -> jump

◆ StartCommand_Ladder()

proto native HumanCommandLadder StartCommand_Ladder ( Building  pBuilding,
int  pLadderIndex 
)
private

--— LADDER --—

starts command - fall

◆ StartCommand_Melee()

proto native HumanCommandMelee StartCommand_Melee ( EntityAI  pTarget)
private

--— MELEE --—

starts command - melee

◆ StartCommand_Melee2()

proto native HumanCommandMelee2 StartCommand_Melee2 ( EntityAI  pTarget,
int  pHitType,
float  pComboValue,
vector  hitPos = vector.Zero 
)
private

starts command - melee2

◆ StartCommand_Move()

proto native HumanCommandMove StartCommand_Move ( )
private

--— MOVE --—

starts command - Move

◆ StartCommand_Script()

proto native HumanCommandScript StartCommand_Script ( HumanCommandScript  pHumanCommand)
private

— SCRIPTED COMMANDS

starts command - Action pStanceMask is mix of flags STANCEMASK_ERECT, ...

◆ StartCommand_ScriptInst()

proto native HumanCommandScript StartCommand_ScriptInst ( typename pCallbackClass  )
private

◆ StartCommand_Swim()

proto native HumanCommandSwim StartCommand_Swim ( )
private

--— LADDER --—

starts command - Swim

◆ StartCommand_Unconscious()

proto native HumanCommandUnconscious StartCommand_Unconscious ( float  pType)
private

starts command - unconscious

◆ StartCommand_Vehicle()

proto native HumanCommandVehicle StartCommand_Vehicle ( Transport  pTransport,
int  pTransportPositionIndex,
int  pVehicleSeat,
bool  fromUnconscious = false 
)
private

--— VEHICLE --—

starts command - vehicle

◆ StartDeath()

proto native void StartDeath ( )
private

◆ UnlinkFromLocalSpace()

proto native void UnlinkFromLocalSpace ( )
private

The documentation for this class was generated from the following file: