|
Arma Reforger Script API
|
Public Member Functions | |
| override bool | HasDataToReplicate () |
| Use it to save bandwidth in some default conditions. Use it if Save and Load are overriden. | |
| override bool | Save (notnull ScriptBitWriter writer) |
| Called to save information related to the hitzone EnableScriptDataStreaming has to return true for this method to be called. | |
| override bool | Load (notnull ScriptBitReader reader) |
| Load the buffer written on Save EnableScriptDataStreaming has to return true for this method to be called. | |
| 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 () |
Public Member Functions inherited from SCR_DestructibleHitzone | |
| ref SCR_DestructionBaseHandler | GetDestructionHandler () |
| PointInfo | GetSecondaryExplosionPoint () |
| Get secondary explosion desired scale. It will determine the prefab retrieved from secondary explosion config. | |
| void | StartDestruction (bool immediate=false) |
| Start destruction effects. | |
| void | PlayDestructionParticle (EDamageState state) |
| Start destruction particle. | |
Public Member Functions inherited from SCR_HitZone | |
| 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 () |
| 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 | OnDamage (notnull BaseDamageContext damageContext) |
| Called when the damage has been dealt by the server, doesn't get called for DOT. | |
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 | OnCharacterEjectedFromDestroyedCompartment (ChimeraCharacter playerCharacter, IEntity compartmentEntity) |
| Callback that will be triggered when character will be removed from the destroyed vehicle. | |
| void | ForceStartDestruction () |
| Force begining of the destruction process. | |
| 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. | |
Static Protected Attributes | |
| static const float | FIRE_TERRAIN_HEIGHT_TOLERANCE = 2.2 |
| static const float | LIGHT_EMISSIVITY_START = 5 |
Static Protected Attributes inherited from SCR_DestructibleHitzone | |
| const int | FORCED_DESTRUCTION_DELAY = 1000 |
| Time after which we will no longer wait for players to leave destroyed vehicle and force start the destruction. | |
| 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 |
| override bool SCR_FlammableHitZone.HasDataToReplicate | ( | ) |
Use it to save bandwidth in some default conditions. Use it if Save and Load are overriden.
Implements HitZone.
| void SCR_FlammableHitZone.InitFireRates | ( | ) |
Compute smoke and fire damage thresholds and rates.
| override bool SCR_FlammableHitZone.Load | ( | notnull ScriptBitReader | reader | ) |
Load the buffer written on Save EnableScriptDataStreaming has to return true for this method to be called.
| ScriptBitReader | reader: Buffer to read the data from. |
Implements HitZone.
| 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.
| override bool SCR_FlammableHitZone.Save | ( | notnull ScriptBitWriter | writer | ) |
Called to save information related to the hitzone EnableScriptDataStreaming has to return true for this method to be called.
| ScriptBitWriter | writer: Buffer where you will write the data necessary. Remember: Don't waste bandwidth, only write information if it has changed. This means that if it has no changes, you should only send a bit to indicate that. |
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 |