Description
Adds a player event handler.
Possible events
”unit” | player controlled unit changed |
”weapon” | currently selected weapon change |
”turretweapon” | currently selected turret weapon change |
”muzzle” | currently selected muzzle change |
”weaponMode” | currently selected weapon mode change |
”loadout” | players loadout changed |
”vehicle” | players current vehicle changed |
”turret” | position in vehicle changed |
”turretOpticsMode” | turret zoom (FOV) changed |
”visionMode” | player changed to normal/night/thermal view |
”cameraView” | camera mode changed (“Internal”, “External”, “Gunner” etc.) |
”featureCamera” | camera changed (Curator, Arsenal, Spectator etc.) |
”visibleMap” | opened or closed map |
”group” | player group changes |
”leader” | leader of player changes |
Parameters
_type | Event handler type. STRING |
_function | Function to add to event. <CODE> |
_applyRetroactively | Call function immediately if player is defined already (optional, default: false) <BOOL> |
Returns
_id | The ID of the event handler. <NUMBER> |
Examples
_id = ["unit", {systemChat str _this}] call CBA_fnc_addPlayerEventHandler;
Author
commy2