Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
HumanCommandScript Class Reference

HumanCommandScript fully scriptable command. More...

Private Member Functions

proto native void AddHeadingRelativeTo (HumanRelativeHeadingMode mode, float yawAngle, float filterDt=-1, float maxYawSpeed=FLT_MAX)
float GetCurrentLeaning ()
 Override this to return the current leaning state of the human. <-1, 1>.
int GetCurrentMovement ()
 Override this to return the current movement state of the human.
int GetCurrentStance ()
 Override this to return the current stance of the human.
void OnActivate ()
 constructor must have 1st parameter to be Human
void OnDeactivate ()
 called when command ends
proto native void PostPhys_GetPosition (out vector pOutTransl)
 script function usable in PostPhysUpdate
proto native void PostPhys_GetRotation (out float pOutRot[4])
 vec3 in world space
proto native void PostPhys_LockRotation ()
 quaternion in world space
proto native void PostPhys_SetPosition (vector pInTransl)
 quaternion in world space
proto native void PostPhys_SetRotation (float pInRot[4])
 vec3 in world space
bool PostPhysUpdate (float pDt)
 override this ! final adjustment of physics state (after physics was applied) returns true if command continues running / false if command should end (or you can use SetFlagFinished(true))
proto native void PreAnim_CallCommand (int pCommand, int pParamInt, float pParamFloat)
 function usable in PreAnimUpdate or in !!! OnActivate !!!
proto native void PreAnim_SetBool (int pVar, bool pBool)
void PreAnim_SetFilteredHeading (float pYawAngle, float pFilterDt, float pMaxYawSpeed)
proto native void PreAnim_SetFloat (int pVar, float pFlt)
proto native void PreAnim_SetInt (int pVar, int pInt)
void PreAnimUpdate (float pDt)
 override this ! called before any animation is processed here change animation values, add animation commands
proto native bool PrePhys_GetRotation (out float pOutRot[4])
proto native bool PrePhys_GetTranslation (out vector pOutTransl)
proto native bool PrePhys_IsEvent (int pEvent)
 script function usable in PrePhysUpdate
proto native bool PrePhys_IsTag (int pTag)
proto native void PrePhys_SetRotation (float pInRot[4])
proto native void PrePhys_SetTranslation (vector pInTransl)
void PrePhysUpdate (float pDt)
 override this ! after animation is processed, before physics is processed
proto native void SetFlagFinished (bool pFinished)
 this terminates human command script and shows CommandHandler( ... pCurrentCommandFinished == true );
proto native void SetHeading (float yawAngle, float filterDt=-1, float maxYawSpeed=FLT_MAX)
 sets character rotation (heading) (PreAnim/PrePhys only!)

Detailed Description

HumanCommandScript fully scriptable command.

Warning
NON-MANAGED, will be managed by C++ once it is sent to the CommandHandler through Human.StartCommand_Script
Note
So ideally, it is best to set up the HumanCommandScript, not create any instances and start it through Human.StartCommand_ScriptInst In case an instance needs to be created, it needs manual deletion if not sent to the CommandHandler But deleting it while it is in the CommandHandler will cause crashes

Definition at line 1209 of file human.c.

Member Function Documentation

◆ AddHeadingRelativeTo()

proto native void AddHeadingRelativeTo ( HumanRelativeHeadingMode mode,
float yawAngle,
float filterDt = -1,
float maxYawSpeed = FLT_MAX )
private

◆ GetCurrentLeaning()

float GetCurrentLeaning ( )
inlineprivate

Override this to return the current leaning state of the human. <-1, 1>.

Definition at line 1250 of file human.c.

◆ GetCurrentMovement()

int GetCurrentMovement ( )
inlineprivate

Override this to return the current movement state of the human.

Definition at line 1244 of file human.c.

◆ GetCurrentStance()

int GetCurrentStance ( )
inlineprivate

Override this to return the current stance of the human.

Definition at line 1238 of file human.c.

◆ OnActivate()

void OnActivate ( )
inlineprivate

constructor must have 1st parameter to be Human

virtual to be overridden called when command starts

Definition at line 1216 of file human.c.

◆ OnDeactivate()

void OnDeactivate ( )
inlineprivate

called when command ends

Definition at line 1219 of file human.c.

◆ PostPhys_GetPosition()

proto native void PostPhys_GetPosition ( out vector pOutTransl)
private

script function usable in PostPhysUpdate

◆ PostPhys_GetRotation()

proto native void PostPhys_GetRotation ( out float pOutRot[4])
private

vec3 in world space

◆ PostPhys_LockRotation()

proto native void PostPhys_LockRotation ( )
private

quaternion in world space

◆ PostPhys_SetPosition()

proto native void PostPhys_SetPosition ( vector pInTransl)
private

quaternion in world space

◆ PostPhys_SetRotation()

proto native void PostPhys_SetRotation ( float pInRot[4])
private

vec3 in world space

◆ PostPhysUpdate()

bool PostPhysUpdate ( float pDt)
private

override this ! final adjustment of physics state (after physics was applied) returns true if command continues running / false if command should end (or you can use SetFlagFinished(true))

◆ PreAnim_CallCommand()

proto native void PreAnim_CallCommand ( int pCommand,
int pParamInt,
float pParamFloat )
private

function usable in PreAnimUpdate or in !!! OnActivate !!!

◆ PreAnim_SetBool()

proto native void PreAnim_SetBool ( int pVar,
bool pBool )
private

◆ PreAnim_SetFilteredHeading()

void PreAnim_SetFilteredHeading ( float pYawAngle,
float pFilterDt,
float pMaxYawSpeed )
inlineprivate

Definition at line 1269 of file human.c.

References SetHeading().

◆ PreAnim_SetFloat()

proto native void PreAnim_SetFloat ( int pVar,
float pFlt )
private

◆ PreAnim_SetInt()

proto native void PreAnim_SetInt ( int pVar,
int pInt )
private

◆ PreAnimUpdate()

void PreAnimUpdate ( float pDt)
private

override this ! called before any animation is processed here change animation values, add animation commands

◆ PrePhys_GetRotation()

proto native bool PrePhys_GetRotation ( out float pOutRot[4])
private

◆ PrePhys_GetTranslation()

proto native bool PrePhys_GetTranslation ( out vector pOutTransl)
private

◆ PrePhys_IsEvent()

proto native bool PrePhys_IsEvent ( int pEvent)
private

script function usable in PrePhysUpdate

◆ PrePhys_IsTag()

proto native bool PrePhys_IsTag ( int pTag)
private

◆ PrePhys_SetRotation()

proto native void PrePhys_SetRotation ( float pInRot[4])
private

◆ PrePhys_SetTranslation()

proto native void PrePhys_SetTranslation ( vector pInTransl)
private

◆ PrePhysUpdate()

void PrePhysUpdate ( float pDt)
private

override this ! after animation is processed, before physics is processed

◆ SetFlagFinished()

proto native void SetFlagFinished ( bool pFinished)
private

this terminates human command script and shows CommandHandler( ... pCurrentCommandFinished == true );

◆ SetHeading()

proto native void SetHeading ( float yawAngle,
float filterDt = -1,
float maxYawSpeed = FLT_MAX )
private

sets character rotation (heading) (PreAnim/PrePhys only!)

Referenced by PreAnim_SetFilteredHeading().


The documentation for this class was generated from the following file:
  • F:/Games/Dayz/scripts/3_game/human.c