Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
areadamagemanager.c File Reference

Go to the source code of this file.

Data Structures

class  AreaDamageComponentTypes
 

Functions

void AreaDamageManager (EntityAI parent)
 
void ~AreaDamageManager ()
 
void SetDamageComponentType (int type)
 
void Spawn ()
 spawn damage trigger More...
 
void Destroy ()
 destroy damage trigger More...
 
AreaDamageEvents Implementation

Implementation for handling AreaDamageEvents Pass them on to the AreaDamageComponent Calling of the events that are the same in TriggerEvents will come from AreaDamageTriggerBase

override void OnTriggerCreated ()
 
override void OnTriggerDestroyed ()
 Called when a trigger is destroyed. More...
 
override void OnEnterBeginEvent (TriggerInsider insider)
 Called when an object enters the trigger. More...
 
override void OnEnterServerEvent (TriggerInsider insider)
 
override void OnEnterClientEvent (TriggerInsider insider)
 
override void OnEnterEndEvent (TriggerInsider insider)
 
override void OnStayStartBeginEvent (int nrOfInsiders)
 Called at the beginning of an update loop. More...
 
override void OnStayStartServerEvent (int nrOfInsiders)
 
override void OnStayStartClientEvent (int nrOfInsiders)
 
override void OnStayStartEndEvent (int nrOfInsiders)
 
override void OnStayBeginEvent (TriggerInsider insider, float deltaTime)
 Called in the update loop. More...
 
override void OnStayServerEvent (TriggerInsider insider, float deltaTime)
 
override void OnStayClientEvent (TriggerInsider insider, float deltaTime)
 
override void OnStayEndEvent (TriggerInsider insider, float deltaTime)
 
override void OnStayFinishBeginEvent ()
 Called at the end of an update loop. More...
 
override void OnStayFinishServerEvent ()
 
override void OnStayFinishClientEvent ()
 
override void OnStayFinishEndEvent ()
 
override void OnLeaveBeginEvent (TriggerInsider insider)
 Called when an object leaves the trigger. More...
 
override void OnLeaveServerEvent (TriggerInsider insider)
 
override void OnLeaveClientEvent (TriggerInsider insider)
 
override void OnLeaveEndEvent (TriggerInsider insider)
 
override bool OnEvaluateDamage (TriggerInsider insider, float damageCoef)
 Tell the AreaDamageComponent to calculate and apply the damage to the Object. More...
 
override void PreDamageActions ()
 Usually called from AreaDamageComponent. More...
 
override void PostDamageActions ()
 Usually called from AreaDamageComponent. More...
 
bool OnEvaluateDamageEx (TriggerInsider insider, float deltaTime)
 
protected float CalculateDamageScale (TriggerInsider insider, float deltaTime)
 Helper for calculating damageCoeff when using OnEvaluateDamageEx. More...
 
void SetExtents (vector mins, vector maxs)
 
void GetExtents (out vector mins, out vector maxs)
 
void GetWorldExtents (out vector mins, out vector maxs)
 
void SetAmmoName (string ammo_name)
 
string GetAmmoName ()
 
void SetDamageType (int pDamageType)
 
int GetDamageType ()
 
void SetParentObject (EntityAI obj)
 
EntityAI GetParentObject ()
 
void SetAreaPosition (vector position)
 
vector GetPosition ()
 Get the world position of the Effect. More...
 
void SetAreaOrientation (vector orientation)
 
vector GetOrientation ()
 
void SetDamageableTypes (array< typename > damageableTypes)
 
array< typenameGetDamageableTypes ()
 
void AddDamageableType (typename damageableType)
 
void RemoveAddDamageableType (typename damageableType)
 
void SetLoopInterval (float time)
 
void SetDeferDuration (float time)
 
void SetHitZones (array< string > hitzones)
 
void SetRaycastSources (array< string > raycast_sources)
 
void SetRaycastSourcesVector (array< vector > raycast_sources)
 
AreaDamageTriggerBase GetTrigger ()
 
protected bool CreateDamageTriggerEx ()
 
protected void CreateDamageTrigger ()
 
protected bool DestroyDamageTriggerEx ()
 
protected void DestroyDamageTrigger ()
 

Variables

class AreaDamageComponentTypes m_ParentObject
 
protected AreaDamageTriggerBase m_AreaDamageTrigger
 
protected ref AreaDamageComponent m_DamageComponent
 
protected vector m_ExtentMin
 
protected vector m_ExtentMax
 
protected vector m_AreaPosition
 
protected vector m_AreaOrientation
 
protected string m_TriggerBaseClass
 

Function Documentation

◆ AddDamageableType()

void AddDamageableType ( typename damageableType  )

Definition at line 320 of file areadamagemanager.c.

◆ AreaDamageManager()

void AreaDamageManager ( EntityAI  parent)

Definition at line 22 of file areadamagemanager.c.

◆ CalculateDamageScale()

protected float CalculateDamageScale ( TriggerInsider  insider,
float  deltaTime 
)

Helper for calculating damageCoeff when using OnEvaluateDamageEx.

Definition at line 224 of file areadamagemanager.c.

◆ CreateDamageTrigger()

protected void CreateDamageTrigger ( )

Definition at line 397 of file areadamagemanager.c.

◆ CreateDamageTriggerEx()

protected bool CreateDamageTriggerEx ( )

create damage trigger with basic set of params

Definition at line 377 of file areadamagemanager.c.

◆ DestroyDamageTrigger()

protected void DestroyDamageTrigger ( )

Definition at line 418 of file areadamagemanager.c.

◆ DestroyDamageTriggerEx()

protected bool DestroyDamageTriggerEx ( )

destroys damage trigger

Definition at line 406 of file areadamagemanager.c.

◆ GetAmmoName()

string GetAmmoName ( )

Definition at line 260 of file areadamagemanager.c.

◆ GetDamageableTypes()

array<typename> GetDamageableTypes ( )

Definition at line 315 of file areadamagemanager.c.

◆ GetDamageType()

int GetDamageType ( )

Definition at line 269 of file areadamagemanager.c.

◆ GetExtents()

void GetExtents ( out vector  mins,
out vector  maxs 
)

Definition at line 243 of file areadamagemanager.c.

◆ GetOrientation()

vector GetOrientation ( )

Definition at line 306 of file areadamagemanager.c.

◆ GetParentObject()

EntityAI GetParentObject ( )

Definition at line 278 of file areadamagemanager.c.

◆ GetPosition()

vector GetPosition ( )

Get the world position of the Effect.

Warning
Only gets the cached variable, for immediate effect use GetCurrent variant
Returns
vector The world position of the Effect

Definition at line 292 of file areadamagemanager.c.

◆ GetTrigger()

AreaDamageTriggerBase GetTrigger ( )

Definition at line 368 of file areadamagemanager.c.

◆ GetWorldExtents()

void GetWorldExtents ( out vector  mins,
out vector  maxs 
)

Definition at line 248 of file areadamagemanager.c.

◆ OnEnterBeginEvent()

override void OnEnterBeginEvent ( TriggerInsider  insider)

Called when an object enters the trigger.

Definition at line 103 of file areadamagemanager.c.

◆ OnEnterClientEvent()

override void OnEnterClientEvent ( TriggerInsider  insider)

Definition at line 111 of file areadamagemanager.c.

◆ OnEnterEndEvent()

override void OnEnterEndEvent ( TriggerInsider  insider)

Definition at line 115 of file areadamagemanager.c.

◆ OnEnterServerEvent()

override void OnEnterServerEvent ( TriggerInsider  insider)

Definition at line 107 of file areadamagemanager.c.

◆ OnEvaluateDamage()

override bool OnEvaluateDamage ( TriggerInsider  insider,
float  damageCoef 
)

Tell the AreaDamageComponent to calculate and apply the damage to the Object.

Definition at line 193 of file areadamagemanager.c.

◆ OnEvaluateDamageEx()

bool OnEvaluateDamageEx ( TriggerInsider  insider,
float  deltaTime 
)

Some event extensions

Alternative OnEvaluateDamage, using CalculateDamageScale

Definition at line 218 of file areadamagemanager.c.

◆ OnLeaveBeginEvent()

override void OnLeaveBeginEvent ( TriggerInsider  insider)

Called when an object leaves the trigger.

Definition at line 175 of file areadamagemanager.c.

◆ OnLeaveClientEvent()

override void OnLeaveClientEvent ( TriggerInsider  insider)

Definition at line 183 of file areadamagemanager.c.

◆ OnLeaveEndEvent()

override void OnLeaveEndEvent ( TriggerInsider  insider)

Definition at line 187 of file areadamagemanager.c.

◆ OnLeaveServerEvent()

override void OnLeaveServerEvent ( TriggerInsider  insider)

Definition at line 179 of file areadamagemanager.c.

◆ OnStayBeginEvent()

override void OnStayBeginEvent ( TriggerInsider  insider,
float  deltaTime 
)

Called in the update loop.

Definition at line 139 of file areadamagemanager.c.

◆ OnStayClientEvent()

override void OnStayClientEvent ( TriggerInsider  insider,
float  deltaTime 
)

Definition at line 147 of file areadamagemanager.c.

◆ OnStayEndEvent()

override void OnStayEndEvent ( TriggerInsider  insider,
float  deltaTime 
)

Definition at line 151 of file areadamagemanager.c.

◆ OnStayFinishBeginEvent()

override void OnStayFinishBeginEvent ( )

Called at the end of an update loop.

Definition at line 157 of file areadamagemanager.c.

◆ OnStayFinishClientEvent()

override void OnStayFinishClientEvent ( )

Definition at line 165 of file areadamagemanager.c.

◆ OnStayFinishEndEvent()

override void OnStayFinishEndEvent ( )

Definition at line 169 of file areadamagemanager.c.

◆ OnStayFinishServerEvent()

override void OnStayFinishServerEvent ( )

Definition at line 161 of file areadamagemanager.c.

◆ OnStayServerEvent()

override void OnStayServerEvent ( TriggerInsider  insider,
float  deltaTime 
)

Definition at line 143 of file areadamagemanager.c.

◆ OnStayStartBeginEvent()

override void OnStayStartBeginEvent ( int  nrOfInsiders)

Called at the beginning of an update loop.

Definition at line 121 of file areadamagemanager.c.

◆ OnStayStartClientEvent()

override void OnStayStartClientEvent ( int  nrOfInsiders)

Definition at line 129 of file areadamagemanager.c.

◆ OnStayStartEndEvent()

override void OnStayStartEndEvent ( int  nrOfInsiders)

Definition at line 133 of file areadamagemanager.c.

◆ OnStayStartServerEvent()

override void OnStayStartServerEvent ( int  nrOfInsiders)

Definition at line 125 of file areadamagemanager.c.

◆ OnTriggerCreated()

override void OnTriggerCreated ( )

Called when a trigger is created

Definition at line 91 of file areadamagemanager.c.

◆ OnTriggerDestroyed()

override void OnTriggerDestroyed ( )

Called when a trigger is destroyed.

Definition at line 97 of file areadamagemanager.c.

◆ PostDamageActions()

override void PostDamageActions ( )

Usually called from AreaDamageComponent.

Definition at line 206 of file areadamagemanager.c.

◆ PreDamageActions()

override void PreDamageActions ( )

Usually called from AreaDamageComponent.

Definition at line 199 of file areadamagemanager.c.

◆ RemoveAddDamageableType()

void RemoveAddDamageableType ( typename damageableType  )

Definition at line 326 of file areadamagemanager.c.

◆ SetAmmoName()

void SetAmmoName ( string  ammo_name)

Definition at line 256 of file areadamagemanager.c.

◆ SetAreaOrientation()

void SetAreaOrientation ( vector  orientation)

Definition at line 297 of file areadamagemanager.c.

◆ SetAreaPosition()

void SetAreaPosition ( vector  position)

Definition at line 283 of file areadamagemanager.c.

◆ SetDamageableTypes()

void SetDamageableTypes ( array< typename damageableTypes)

Definition at line 311 of file areadamagemanager.c.

◆ SetDamageComponentType()

void SetDamageComponentType ( int  type)

Definition at line 41 of file areadamagemanager.c.

◆ SetDamageType()

void SetDamageType ( int  pDamageType)

Definition at line 265 of file areadamagemanager.c.

◆ SetDeferDuration()

void SetDeferDuration ( float  time)

Definition at line 336 of file areadamagemanager.c.

◆ SetExtents()

void SetExtents ( vector  mins,
vector  maxs 
)

script configuration

Definition at line 233 of file areadamagemanager.c.

◆ SetHitZones()

void SetHitZones ( array< string hitzones)

Definition at line 341 of file areadamagemanager.c.

◆ SetLoopInterval()

void SetLoopInterval ( float  time)

Definition at line 331 of file areadamagemanager.c.

◆ SetParentObject()

void SetParentObject ( EntityAI  obj)

Definition at line 274 of file areadamagemanager.c.

◆ SetRaycastSources()

void SetRaycastSources ( array< string raycast_sources)

Definition at line 350 of file areadamagemanager.c.

◆ SetRaycastSourcesVector()

void SetRaycastSourcesVector ( array< vector raycast_sources)

Definition at line 359 of file areadamagemanager.c.

◆ Spawn()

void Spawn ( )

spawn damage trigger

Definition at line 70 of file areadamagemanager.c.

◆ ~AreaDamageManager()

void ~AreaDamageManager ( )

Definition at line 36 of file areadamagemanager.c.

Variable Documentation

◆ m_AreaDamageTrigger

protected AreaDamageTriggerBase m_AreaDamageTrigger

Definition at line 11 of file areadamagemanager.c.

◆ m_AreaOrientation

protected vector m_AreaOrientation

Definition at line 18 of file areadamagemanager.c.

◆ m_AreaPosition

protected vector m_AreaPosition

Definition at line 17 of file areadamagemanager.c.

◆ m_DamageComponent

protected ref AreaDamageComponent m_DamageComponent

Definition at line 13 of file areadamagemanager.c.

◆ m_ExtentMax

protected vector m_ExtentMax

Definition at line 16 of file areadamagemanager.c.

◆ m_ExtentMin

protected vector m_ExtentMin

Definition at line 15 of file areadamagemanager.c.

◆ m_ParentObject

class AreaDamageComponentTypes m_ParentObject

◆ m_TriggerBaseClass

protected string m_TriggerBaseClass

Definition at line 20 of file areadamagemanager.c.