Arma Reforger Script API
|
Public Member Functions | |
override void | OnInit (IEntity pOwnerEntity, GenericComponent pManagerComponent) |
Call OnInit method from script. | |
override EHitZoneGroup | GetHitZoneGroup () |
Hit zone group getter to be overridden. | |
override void | OnMaxHealthChanged () |
Called when max damage changes. | |
void | InitFireRates () |
Compute smoke and fire damage thresholds and rates. | |
override float | ComputeEffectiveDamage (notnull BaseDamageContext damageContext, bool isDOT) |
Calculates the amount of damage a hitzone will receive. | |
void | HandleIncendiaryDamage (notnull BaseDamageContext damageContext) |
Modify fire rate based on received incendiary impacts. | |
Instigator | GetFireInstigator () |
Inform damage manager about fire instigator. | |
override void | OnDamageStateChanged (EDamageState newState, EDamageState previousDamageState, bool isJIP) |
Destruction logic. | |
float | GetFireRate () |
Get rate of fire (dps). If it is below fire damage threshold, no damage will be dealt. | |
void | SetFireRate (float fireRate) |
Set rate of fire (dps). If it is below fire damage threshold, no damage will be dealt. | |
float | GetFireRateForState (SCR_EBurningState fireState, float weight=-1) |
Get fire rate that will achieve specified fire state. | |
SCR_EBurningState | GetFireState () |
Returns current fire state. | |
void | SetFireState (SCR_EBurningState fireState, float weight=-1, bool changeRate=true) |
Set fire rate that will achieve specified fire state. | |
SCR_EBurningState | GetFireStateForRate (float fireRate) |
Get fire state that will be achieved for specified fire rate. | |
void | StopFireRateUpdate () |
Stop fire rate updates until requested again. | |
void | LockFireRate (bool locked=true) |
Temporarily stop fire rate changes until incendiary damage is received again. | |
void | StartDestructionFire () |
void | StopDestructionFire () |
override float | GetSecondaryExplosionScale () |
Get secondary explosion desired scale. It will determine the prefab retrieved from secondary explosion config. | |
void | ~SCR_FlammableHitZone () |
override EHitZoneGroup | GetHitZoneGroup () |
Hit zone group getter to be overridden. | |
Public Member Functions inherited from SCR_DestructibleHitzone | |
ref SCR_DestructionBaseHandler | GetDestructionHandler () |
override void | OnInit (IEntity pOwnerEntity, GenericComponent pManagerComponent) |
Call OnInit method from script. | |
float | GetSecondaryExplosionScale () |
Get secondary explosion desired scale. It will determine the prefab retrieved from secondary explosion config. | |
PointInfo | GetSecondaryExplosionPoint () |
Get secondary explosion desired scale. It will determine the prefab retrieved from secondary explosion config. | |
override void | OnDamageStateChanged (EDamageState newState, EDamageState previousDamageState, bool isJIP) |
Kill occupants and start destruction. | |
void | StartDestruction (bool immediate=false) |
Start destruction effects. | |
void | PlayDestructionParticle (EDamageState state) |
Start destruction particle. | |
Public Member Functions inherited from SCR_HitZone | |
EHitZoneGroup | GetHitZoneGroup () |
Hit zone group getter to be overridden. | |
ScriptInvokerVoid | GetOnHealthChanged (bool createNew=true) |
Get event called when hitzone damage changes. | |
ScriptInvoker | GetOnDamageStateChanged (bool createNew=true) |
Get event called when hitzone damage state changes. | |
IEntity | GetOwner () |
override float | ComputeEffectiveDamage (notnull BaseDamageContext damageContext, bool isDOT) |
Calculates the amount of damage a hitzone will receive. | |
void | DrawDebug () |
void | ApplyDamagePassRules (notnull BaseDamageContext damageContext) |
void | HandlePassedDamage (notnull BaseDamageContext damageContext) |
Public Member Functions inherited from HitZone | |
proto external float | GetBaseDamageMultiplier () |
proto external bool | HasColliderNodes () |
proto external int | GetColliderDescriptorIndex (int colliderID) |
proto external float | GetDamageMultiplier (EDamageType dmgType) |
proto external float | GetDamageReduction () |
proto external float | GetDamageThreshold () |
proto external int | GetAllColliderNames (out notnull array< string > colliderNames) |
proto external void | SetDamageOverTime (EDamageType dmgType, float dps) |
Sets damage over time for this particular hitzone. | |
proto external float | GetDamageOverTime (EDamageType dmgType) |
proto external int | GetNumColliderDescriptors () |
proto external HitZoneContainerComponent | GetHitZoneContainer () |
proto external void | SetHealth (float health) |
proto external void | SetHealthScaled (float health) |
proto external void | SetMaxHealth (float maxHealth, ESetMaxHealthFlags flag=ESetMaxHealthFlags.NONE) |
proto external float | GetHealth () |
proto external float | GetHealthScaled () |
proto external float | GetDamageStateThreshold (EDamageState damageState) |
proto external float | GetMaxHealth () |
proto external string | GetName () |
proto external EDamageState | GetDamageState () |
proto external float | GetCriticalDamageThreshold () |
proto external EDamageState | GetPreviousDamageState () |
proto external void | HandleDamage (float damage, int damageType, IEntity instigator) |
proto external bool | IsProxy () |
proto external int | GetColliderIDs (out notnull array< int > outIDs) |
Returns all collider IDs attached to this hitzone. | |
proto bool | TryGetColliderDescription (IEntity owner, int descIndex, out vector transformLS[4], out int boneIndex, out int nodeID) |
proto bool | TryGetColliderDescriptionFromName (IEntity owner, string colliderName, out vector transformLS[4], out int boneIndex, out int nodeID) |
void | OnInit (IEntity pOwnerEntity, GenericComponent pManagerComponent) |
Call OnInit method from script. | |
void | OnDamage (notnull BaseDamageContext damageContext) |
Called when the damage has been dealt by the server, doesn't get called for DOT. | |
float | ComputeEffectiveDamage (notnull BaseDamageContext damageContext, bool isDOT) |
Calculates the amount of damage a hitzone will receive. | |
Protected Member Functions | |
void | SetFireInstigator (Instigator instigator) |
Inform damage manager about fire instigator. | |
float | CalculateNewFireRate (float fireRate, float deltaTime) |
Determine new fire rate. | |
void | ApplyFireDamage (float fireRate, float deltaTime) |
Apply fire damage to hitzone and to compartment occupants. | |
void | UpdateFireRate (bool forceUpdate=false) |
Flammable hitzone is not immediately set on fire. | |
void | StartDestructionGroundFire () |
Attempts to spawn fire effect on the ground under the burning wreck. | |
void | UpdateFireEffects (SCR_EBurningState fireState) |
Logic when vehicle is damaged. | |
void | FireLightOn () |
void | FireLightOff () |
Protected Member Functions inherited from SCR_DestructibleHitzone | |
void | StopDestruction () |
Stop destruction effects. | |
SCR_VehicleDamageManagerComponent | FindParentVehicleDamageManager () |
void | PlayDestructionSound (EDamageState damageState) |
Start destruction sounds. | |
Protected Member Functions inherited from SCR_HitZone | |
override void | OnHealthSet () |
Called when damage changes. | |
override void | OnDamageStateChanged (EDamageState newState, EDamageState previousDamageState, bool isJIP) |
Called when the damage state changes. | |
void | OnHealthSet () |
Called when damage changes. | |
void | OnMaxHealthChanged () |
Called when max damage changes. | |
void | OnDamageStateChanged (EDamageState newState, EDamageState previousDamageState, bool isJIP) |
Called when damage state changes. | |
Static Protected Attributes | |
static const float | FIRE_TERRAIN_HEIGHT_TOLERANCE = 2.2 |
static const float | LIGHT_EMISSIVITY_START = 5 |
void SCR_FlammableHitZone.~SCR_FlammableHitZone | ( | ) |
|
protected |
Apply fire damage to hitzone and to compartment occupants.
fireRate | Current rate of fire |
deltaTime | Time passed in seconds since last update |
|
protected |
Determine new fire rate.
fireRate | Current rate of fire |
deltaTime | Time passed in seconds since last update |
override float SCR_FlammableHitZone.ComputeEffectiveDamage | ( | notnull BaseDamageContext | damageContext, |
bool | isDOT | ||
) |
Calculates the amount of damage a hitzone will receive.
damageType | Damage type |
rawDamage | Incoming damage, without any modifiers taken into account |
hitEntity | Damaged entity |
struckHitZone | Hitzone to be damaged |
damageSource | Projectile |
instigator | Instigator |
hitMaterial | Surface physics material |
colliderID | Collider ID if provided |
hitTransform | Position, direction and normal |
impactVelocity | Projectile velocity at impact |
nodeID | Bone index in mesh object |
isDOT | True if this is a calculation for DamageOverTime |
Implements SCR_HitZone.
|
protected |
|
protected |
Instigator SCR_FlammableHitZone.GetFireInstigator | ( | ) |
Inform damage manager about fire instigator.
float SCR_FlammableHitZone.GetFireRate | ( | ) |
Get rate of fire (dps). If it is below fire damage threshold, no damage will be dealt.
float SCR_FlammableHitZone.GetFireRateForState | ( | SCR_EBurningState | fireState, |
float | weight = -1 |
||
) |
Get fire rate that will achieve specified fire state.
fireState | New fire state to be set |
weight | Part of fire state zone to aim for. Default: -1 (becomes 0.5) |
SCR_EBurningState SCR_FlammableHitZone.GetFireState | ( | ) |
Returns current fire state.
SCR_EBurningState SCR_FlammableHitZone.GetFireStateForRate | ( | float | fireRate | ) |
Get fire state that will be achieved for specified fire rate.
fireRate | Fire rate to test for |
override EHitZoneGroup SCR_FlammableHitZone.GetHitZoneGroup | ( | ) |
override float SCR_FlammableHitZone.GetSecondaryExplosionScale | ( | ) |
Get secondary explosion desired scale. It will determine the prefab retrieved from secondary explosion config.
Implements SCR_DestructibleHitzone.
void SCR_FlammableHitZone.HandleIncendiaryDamage | ( | notnull BaseDamageContext | damageContext | ) |
Modify fire rate based on received incendiary impacts.
damage | Incendiary damage to be handled |
instigator | Instigator of the incendiary damage |
void SCR_FlammableHitZone.InitFireRates | ( | ) |
Compute smoke and fire damage thresholds and rates.
void SCR_FlammableHitZone.LockFireRate | ( | bool | locked = true | ) |
Temporarily stop fire rate changes until incendiary damage is received again.
override void SCR_FlammableHitZone.OnDamageStateChanged | ( | EDamageState | newState, |
EDamageState | previousDamageState, | ||
bool | isJIP | ||
) |
Destruction logic.
Implements SCR_DestructibleHitzone.
override void SCR_FlammableHitZone.OnInit | ( | IEntity | pOwnerEntity, |
GenericComponent | pManagerComponent | ||
) |
Call OnInit method from script.
Implements SCR_DestructibleHitzone.
override void SCR_FlammableHitZone.OnMaxHealthChanged | ( | ) |
Called when max damage changes.
Implements HitZone.
|
protected |
Inform damage manager about fire instigator.
void SCR_FlammableHitZone.SetFireRate | ( | float | fireRate | ) |
Set rate of fire (dps). If it is below fire damage threshold, no damage will be dealt.
void SCR_FlammableHitZone.SetFireState | ( | SCR_EBurningState | fireState, |
float | weight = -1 , |
||
bool | changeRate = true |
||
) |
Set fire rate that will achieve specified fire state.
fireState | New fire state to be set |
weight | Part of fire state zone to aim for. Default: -1 (if state is different, becomes 0.5, otherwise no change) |
rate | Allow changing fire rate. Default: true |
void SCR_FlammableHitZone.StartDestructionFire | ( | ) |
|
protected |
Attempts to spawn fire effect on the ground under the burning wreck.
void SCR_FlammableHitZone.StopDestructionFire | ( | ) |
void SCR_FlammableHitZone.StopFireRateUpdate | ( | ) |
Stop fire rate updates until requested again.
|
protected |
Logic when vehicle is damaged.
|
protected |
Flammable hitzone is not immediately set on fire.
At first it generates smoke which can spontaneously extinguish or ignite itself. Damage is applied once fire rate exceeds damage threshold.
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |