Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_DestructionUtility Interface Reference

This class serves to unify commonly used methods in both SCR_DestructibleEntity and SCR_DestructionMultiPhaseComponent. More...

Static Public Member Functions

static float CalculateMomentum (notnull Contact contact, float ownerMass, float otherMass)
 
static void SpawnDestroyObjects (notnull IEntity owner, notnull array< ref SCR_BaseSpawnable > spawnList, notnull SCR_DestructionHitInfo destructionHitInfo)
 Spawns objects that are meant to be created when the object is destroyed (particles, debris, etc)
 
static void PlaySound (notnull IEntity owner, SCR_EMaterialSoundTypeBreak materialSoundType, int numDamagePhases, int damagePhaseIndex)
 
static void SetModel (notnull IEntity owner, ResourceName modelName)
 Sets the model of the object.
 
static void SetModel (notnull IEntity owner, notnull VObject model)
 Sets the model of the object.
 
static VObject GetModel (ResourceName modelName, out Resource resource)
 
static float GetDestructibleSize (notnull IEntity owner)
 
static void UpdateResponseIndex (notnull Physics physics, float health, float maxHealth)
 
static void RegenerateNavmeshDelayed (notnull IEntity owner)
 
static void SetDamagePhaseSignal (notnull IEntity owner, int damagePhaseIndex=0)
 

Static Protected Attributes

static const float SIMULATION_IMPRECISION_MULTIPLIER = 1.1
 
static const int MIN_MOMENTUM_RESPONSE_INDEX = 1
 
static const int MAX_MOMENTUM_RESPONSE_INDEX = 5
 
static const int MIN_DESTRUCTION_RESPONSE_INDEX = 6
 
static const int MAX_DESTRUCTION_RESPONSE_INDEX = 10
 
static const string DAMAGE_PHASE_SIGNAL_NAME = "DamagePhase"
 

Detailed Description

This class serves to unify commonly used methods in both SCR_DestructibleEntity and SCR_DestructionMultiPhaseComponent.

Since one is a component and the other is an entity, inheritance cannot be used to reuse code so all shared methods will be accessed here.

Member Function Documentation

◆ CalculateMomentum()

static float SCR_DestructionUtility.CalculateMomentum ( notnull Contact contact,
float ownerMass,
float otherMass )
static
Parameters
[in]contact
[in]ownerMass
[in]otherMass
Returns

◆ GetDestructibleSize()

static float SCR_DestructionUtility.GetDestructibleSize ( notnull IEntity owner)
static
Parameters
[in]owner
Returns

◆ GetModel()

static VObject SCR_DestructionUtility.GetModel ( ResourceName modelName,
out Resource resource )
static
Parameters
[in]modelName
[out]resourcepointer that you have to hold on to until the moment the model is set
Returns

◆ PlaySound()

static void SCR_DestructionUtility.PlaySound ( notnull IEntity owner,
SCR_EMaterialSoundTypeBreak materialSoundType,
int numDamagePhases,
int damagePhaseIndex )
static
Parameters
[in]owner
[in]materialSoundType
[in]numDamagePhases
[in]damagePhaseIndex

◆ RegenerateNavmeshDelayed()

static void SCR_DestructionUtility.RegenerateNavmeshDelayed ( notnull IEntity owner)
static
Parameters
[in]owner

◆ SetDamagePhaseSignal()

static void SCR_DestructionUtility.SetDamagePhaseSignal ( notnull IEntity owner,
int damagePhaseIndex = 0 )
static
Parameters
[in]owner
[in]damagePhaseIndex

◆ SetModel() [1/2]

static void SCR_DestructionUtility.SetModel ( notnull IEntity owner,
notnull VObject model )
static

Sets the model of the object.

Parameters
[in]owner
[in]model

◆ SetModel() [2/2]

static void SCR_DestructionUtility.SetModel ( notnull IEntity owner,
ResourceName modelName )
static

Sets the model of the object.

Parameters
[in]owner
[in]modelName

◆ SpawnDestroyObjects()

static void SCR_DestructionUtility.SpawnDestroyObjects ( notnull IEntity owner,
notnull array< ref SCR_BaseSpawnable > spawnList,
notnull SCR_DestructionHitInfo destructionHitInfo )
static

Spawns objects that are meant to be created when the object is destroyed (particles, debris, etc)

◆ UpdateResponseIndex()

static void SCR_DestructionUtility.UpdateResponseIndex ( notnull Physics physics,
float health,
float maxHealth )
static
Parameters
[in]physics
[in]health
[in]maxHealth

Member Data Documentation

◆ DAMAGE_PHASE_SIGNAL_NAME

const string SCR_DestructionUtility.DAMAGE_PHASE_SIGNAL_NAME = "DamagePhase"
staticprotected

◆ MAX_DESTRUCTION_RESPONSE_INDEX

const int SCR_DestructionUtility.MAX_DESTRUCTION_RESPONSE_INDEX = 10
staticprotected

◆ MAX_MOMENTUM_RESPONSE_INDEX

const int SCR_DestructionUtility.MAX_MOMENTUM_RESPONSE_INDEX = 5
staticprotected

◆ MIN_DESTRUCTION_RESPONSE_INDEX

const int SCR_DestructionUtility.MIN_DESTRUCTION_RESPONSE_INDEX = 6
staticprotected

◆ MIN_MOMENTUM_RESPONSE_INDEX

const int SCR_DestructionUtility.MIN_MOMENTUM_RESPONSE_INDEX = 1
staticprotected

◆ SIMULATION_IMPRECISION_MULTIPLIER

const float SCR_DestructionUtility.SIMULATION_IMPRECISION_MULTIPLIER = 1.1
staticprotected

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