Event Handlers – Arma Reforger
System/Component | Event Name | Callback Parameters | Description |
---|---|---|---|
DamagerManagerComponent | OnDestroyed | IEntity owner | when default hitzone is set to destroyed |
CharacterControllerComponent | OnADSChanged | BaseWeaponComponent currentWeapon, bool Value | on player character which switches to ADS |
CharacterControllerComponent | OnInspectionModeChanged | bool newState | on player character which switches in/out of inspection mode |
InventoryStorageManagerComponent | OnMagazineCountChanged | BaseWeaponComponent currentWeapon, int count, bool isGrenade | |
BaseCompartmentManagerComponent | OnCompartmentEntered | IEntity vehicle, BaseCompartmentManagerComponent manager, IEntity occupant, int managerID, int slotID | |
BaseCompartmentManagerComponent | OnCompartmentLeft | IEntity vehicle, BaseCompartmentManagerComponent manager, IEntity occupant, int managerID, int slotID | |
BaseMuzzleComponent BaseWeaponManagerComponent |
OnAmmoCountChanged | BaseWeaponComponent currentWeapon, BaseMuzzleComponent currentMuzzle, BaseMagazineComponent magazine, int ammoCount, bool isChambered | Both weapon and character can raise the event |
BaseWeaponManagerComponent | OnWeaponChanged | BaseWeaponComponent currentWeapon, BaseWeaponComponent oldWeapon | |
BaseWeaponManagerComponent | OnMagazineChanged | BaseWeaponComponent weapon, BaseMagazineComponent newMagazine, BaseMagazineComponent oldMagazine | |
BaseWeaponComponent | OnMuzzleChanged | BaseWeaponComponent weapon, BaseMuzzleComponent newMuzzle, BaseMuzzleComponent oldMuzzle | |
BaseMuzzleComponent | OnFiremodeChanged | BaseWeaponComponent weapon, BaseMuzzleComponent muzzle, int newFiremode | |
BaseSightsComponent | OnZeroingChanged | BaseWeaponComponent weapon, int range | currently does not carry currentMuzzle |
WeaponComponent | OnWeaponAttachmentChanged | WeaponComponent weapon, bool isAttached, IEntity attachmentEntity | isAttached is true if attachmentEntity was attached to the weapon, and false if it was detached. |
TurretControllerComponent | OnTurretReload | BaseWeaponComponent weapon, bool isFinished, TurretControllerComponent turretController | isFinished is true when reload is done and false when it started. |
Entity Event Handlers
EOnInit
Event after the entity is allocated and initialized.
- IEntity owner: the entity
EOnVisible
This event triggers when the entity is made visible (versus being invisible).
- IEntity owner: the entity itself
- int frameNumber:
EOnFrame
This event, as its name suggests, triggers on each simulation frame.
- IEntity owner: the entity
- float timeSlice: time spent since the last frame, in seconds
EOnPostFrame
Triggers after physics update.
- IEntity owner: the entity itself
- float timeSlice:
EOnFixedFrame
- IEntity owner: the entity itself
- float timeSlice:
EOnFixedPostFrame
- IEntity owner: the entity itself
- float timeSlice:
EOnAnimEvent
Event from the animation system
- IEntity owner: the entity itself
- int type:
- int slot:
EOnPhysicsActive
Triggers on (de)activation of the RigidBody's physics.
- IEntity owner: the entity itself
- bool activeState:
EOnPhysicsMove
Triggers when the physics engine moves this entity.
- IEntity owner: the entity itself
EOnSimulate
Happens before physics engine iteration - called from sub-iterations.
- IEntity owner: the entity itself
- float timeSlice:
EOnPostSimulate
Happens after physics engine iteration. Happens once per frame.
- IEntity owner: the entity itself
- float timeSlice:
EOnJointBreak
Triggers when a joint attached to this entity's RigidBody is broken.
- IEntity owner: the entity itself
- IEntity other: the other entity
EOnTouch
Event when touched by another entity. It requires the entity to have TouchComponent.
- IEntity owner: the entity itself
- IEntity other: the touched entity
- int touchTypesMask: unused as of Arma Reforger 0.9.5
EOnContact
Triggers when contact with another RigidBody has been registered.
- IEntity owner: the entity itself
- IEntity other: the other entity
- Contact contact:
EOnDiag
Happens every frame after EOnFrame when "Entity Diag" is enabled in the Diag Menu (e.g Workbench).
- IEntity owner: the entity itself
- float timeSlice:
EOnUser0
- IEntity other:
- int extra:
EOnUser1
- IEntity other:
- int extra:
EOnUser2
- IEntity other:
- int extra:
EOnUser3
- IEntity other:
- int extra:
EOnUser4
- IEntity other:
- int extra: