fnc_eh_firedMan.sqf

Summary
fnc_eh_firedMan.sqf
Functions
OCAP_recorder_fnc_eh_firedManTracks bullet and non-bullet projectiles.
Variables
OCAP_lastFiredIndicates a formatted string of the last weapon and magazine type fired by the unit.
Event Handlers
Projectiles (Bullets)
Projectiles (Non-Bullets)
CBA Events
Projectiles

Functions

OCAP_recorder_fnc_eh_firedMan

Description

Tracks bullet and non-bullet projectiles.  This is the code triggered when a unit firing is detected by the “FiredMan” Event Handler applied to units during OCAP_recorder_fnc_addUnitEventHandlers.

Parameters

_firerUnit the event handler is assigned to (the instigator) [Object]
_weaponFired weapon [String]
_muzzleMuzzle that was used [String]
_modeCurrent mode of the fired weapon [String]
_ammoClassname of ammo used [String]
_magazineClassname of magazine used [String]
_projectileObject of the projectile that was shot out [Object]
_vehicleif weapon is vehicle weapon, otherwise objNull [Object]

Returns

Nothing

Examples

[_firer, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle] call FUNC(eh_firedMan);

Public

No

Author

IndigoFox, Dell

Variables

OCAP_lastFired

Indicates a formatted string of the last weapon and magazine type fired by the unit.  Used for logging hits/kills.  Applied to a firing unit.

Event Handlers

Projectiles (Bullets)

DeletedMakes extension call to draw a fire-line between the firer and the final destination.
ExplodeMakes extension call to draw a fire-line between the firer and the final destination.
HitPartTriggered when a projectile hits a part of a unit.  Calls OCAP_recorder_fnc_eh_projectileHit.
HitExplosionTriggered when a projectile explodes and damages a part of a unit.  Calls OCAP_recorder_fnc_eh_projectileHit.

Projectiles (Non-Bullets)

DeletedTriggered when a non-bullet projectile is deleted.  Updates marker position, then removes it 3 frames later.
ExplodeTriggered when a non-bullet projectile explodes.  Updates marker position, then removes it 3 frames later.
HitPartTriggered when a projectile hits a part of a unit.  Calls OCAP_recorder_fnc_eh_projectileHit.
HitExplosionTriggered when a projectile explodes and damages a part of a unit.  Calls OCAP_recorder_fnc_eh_projectileHit.

CBA Events

Projectiles

OCAP_recorder_addDebugBulletTriggered when a bullet is fired and the debug mode is enabled.  Shares recent bullet data to all clients.
OCAP_recorder_addDebugMagIconTriggered when a non-bullet projectile is fired and the debug mode is enabled.  Shares recent data to all clients.
Used for applying unit-specific event handlers to units during initialization.
Tracks when a unit is hit/takes damage and saves to the timeline.
Close