Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_MeleeComponent Interface Reference
Inheritance diagram for SCR_MeleeComponent:
[legend]

Public Member Functions

bool HasBayonet ()
 
OnMeleePerformedInvoker GetOnMeleePerformed ()
 
void PerformAttack ()
 Called from character command handler, based on user input.
 
void SetMeleeAttackStarted (bool started)
 Enable or disable measuring of hit detection probes.
 
void Update (float timeSlice)
 Event methods.
 
override void OnPostInit (IEntity owner)
 
override void EOnInit (IEntity owner)
 

Protected Member Functions

bool TraceFilter (notnull IEntity ent)
 
vector GetAimingVector (notnull ChimeraCharacter character)
 
bool CheckCollisionsSimple (out SCR_MeleeHitDataClass pHitData)
 Primary collision check that uses TraceMove and single TraceSphere fired from character eye pos along the aim fwd vector.
 
void CollectMeleeWeaponProperties ()
 Prepare information from MeleeWeaponProperties component on weapon.
 
void HandleMeleeSound ()
 Handles playing of sound & setting of signals (AUDIO)
 
void PlaySound (IEntity weaponEntity, vector position, int signalValue0, int signalValue1)
 
void RPC_HandleMeleeSound (RplId weaponID, vector position, int signalValue0, int signalValue1)
 
SCR_DamageManagerComponent SearchHierarchyForDamageManager (IEntity startEntity, out HitZone hitZone)
 Goes upwards the hierarchy of startEntity searching for SCR_DamageManagerComponent to deal damage to.
 
void ProcessMeleeAttack ()
 Processes the melee attack. Applies the damage if applicable.
 
void HandleDamageDelayed ()
 
void Do_OnFrameCleanup ()
 cleanup
 
void Debug_DrawSphereAtPos (vector v, array< ref Shape > dbgShapes, int color=COLOR_BLUE, float size=0.03, ShapeFlags shapeFlags=ShapeFlags.VISIBLE)
 DEBUG methods.
 
void Debug_DrawSphereAtPos (vector pos, int color, array< ref Shape > dbgShapes)
 
void Debug_DrawLineSimple (vector start, vector end, array< ref Shape > dbgShapes)
 

Protected Attributes

ref SCR_MeleeHitDataClass m_MeleeHitData
 
bool m_bMeasurementDone
 holds melee hit data
 
bool m_bAttackAlreadyExecuted = false
 
bool m_bMeleeAttackStarted = false
 attack execution limiter
 
float m_fWeaponMeleeAccuracy
 
float m_fWeaponMeleeRange
 
ref OnMeleePerformedInvoker m_OnMeleePerformed
 
SCR_MeleeWeaponProperties m_MeleeWeaponProperties
 
bool m_bHasBayonet
 

Member Function Documentation

◆ CheckCollisionsSimple()

bool SCR_MeleeComponent.CheckCollisionsSimple ( out SCR_MeleeHitDataClass  pHitData)
protected

Primary collision check that uses TraceMove and single TraceSphere fired from character eye pos along the aim fwd vector.

Parameters
[in]pHitDataSCR_MeleeHitDataClass holder that keeps information about actual hit
Returns
When hit is detected or it is miss

◆ CollectMeleeWeaponProperties()

void SCR_MeleeComponent.CollectMeleeWeaponProperties ( )
protected

Prepare information from MeleeWeaponProperties component on weapon.

Parameters
[in]weaponEquipped melee weapon we are getting the data from

get current weapon and store it into SCR_MeleeHitDataClass instance

◆ Debug_DrawLineSimple()

void SCR_MeleeComponent.Debug_DrawLineSimple ( vector  start,
vector  end,
array< ref Shape >  dbgShapes 
)
protected

◆ Debug_DrawSphereAtPos() [1/2]

void SCR_MeleeComponent.Debug_DrawSphereAtPos ( vector  pos,
int  color,
array< ref Shape >  dbgShapes 
)
protected

◆ Debug_DrawSphereAtPos() [2/2]

void SCR_MeleeComponent.Debug_DrawSphereAtPos ( vector  v,
array< ref Shape >  dbgShapes,
int  color = COLOR_BLUE,
float  size = 0::03,
ShapeFlags  shapeFlags = ShapeFlags::VISIBLE 
)
protected

DEBUG methods.

Drawing of sphere if specified attributes on given vector pos

◆ Do_OnFrameCleanup()

void SCR_MeleeComponent.Do_OnFrameCleanup ( )
protected

cleanup

Cleanup of several variables called on frame

◆ EOnInit()

override void SCR_MeleeComponent.EOnInit ( IEntity  owner)

◆ GetAimingVector()

vector SCR_MeleeComponent.GetAimingVector ( notnull ChimeraCharacter  character)
protected

◆ GetOnMeleePerformed()

OnMeleePerformedInvoker SCR_MeleeComponent.GetOnMeleePerformed ( )
Returns

◆ HandleDamageDelayed()

void SCR_MeleeComponent.HandleDamageDelayed ( )
protected

◆ HandleMeleeSound()

void SCR_MeleeComponent.HandleMeleeSound ( )
protected

Handles playing of sound & setting of signals (AUDIO)

◆ HasBayonet()

bool SCR_MeleeComponent.HasBayonet ( )
Returns

◆ OnPostInit()

override void SCR_MeleeComponent.OnPostInit ( IEntity  owner)

◆ PerformAttack()

void SCR_MeleeComponent.PerformAttack ( )

Called from character command handler, based on user input.

◆ PlaySound()

void SCR_MeleeComponent.PlaySound ( IEntity  weaponEntity,
vector  position,
int  signalValue0,
int  signalValue1 
)
protected

◆ ProcessMeleeAttack()

void SCR_MeleeComponent.ProcessMeleeAttack ( )
protected

Processes the melee attack. Applies the damage if applicable.

◆ RPC_HandleMeleeSound()

void SCR_MeleeComponent.RPC_HandleMeleeSound ( RplId  weaponID,
vector  position,
int  signalValue0,
int  signalValue1 
)
protected

◆ SearchHierarchyForDamageManager()

SCR_DamageManagerComponent SCR_MeleeComponent.SearchHierarchyForDamageManager ( IEntity  startEntity,
out HitZone  hitZone 
)
protected

Goes upwards the hierarchy of startEntity searching for SCR_DamageManagerComponent to deal damage to.

Parameters
[in]startEntity
[out]hitZone
Returns
the found SCR_DamageManagerComponent or null if not found or if startEntity is null

◆ SetMeleeAttackStarted()

void SCR_MeleeComponent.SetMeleeAttackStarted ( bool  started)

Enable or disable measuring of hit detection probes.

Parameters
[in]stateif is/is not allowed to measure

◆ TraceFilter()

bool SCR_MeleeComponent.TraceFilter ( notnull IEntity  ent)
protected

◆ Update()

void SCR_MeleeComponent.Update ( float  timeSlice)

Event methods.

Parameters
[in]timeSlice

Member Data Documentation

◆ m_bAttackAlreadyExecuted

bool SCR_MeleeComponent.m_bAttackAlreadyExecuted = false
protected

◆ m_bHasBayonet

bool SCR_MeleeComponent.m_bHasBayonet
protected

◆ m_bMeasurementDone

bool SCR_MeleeComponent.m_bMeasurementDone
protected

holds melee hit data

◆ m_bMeleeAttackStarted

bool SCR_MeleeComponent.m_bMeleeAttackStarted = false
protected

attack execution limiter

◆ m_fWeaponMeleeAccuracy

float SCR_MeleeComponent.m_fWeaponMeleeAccuracy
protected

◆ m_fWeaponMeleeRange

float SCR_MeleeComponent.m_fWeaponMeleeRange
protected

◆ m_MeleeHitData

ref SCR_MeleeHitDataClass SCR_MeleeComponent.m_MeleeHitData
protected

◆ m_MeleeWeaponProperties

SCR_MeleeWeaponProperties SCR_MeleeComponent.m_MeleeWeaponProperties
protected

◆ m_OnMeleePerformed

ref OnMeleePerformedInvoker SCR_MeleeComponent.m_OnMeleePerformed
protected

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