Please add EHs or MEHs for radio emission. Radio emission can be from cfgRadio pre-defined sounds, or when player(s) hits the radio button for a voice message.
Two possibilities:
- linked to a unit:
something like the already existing "soundPlayed" EH:
this addEventHandler ["radioEmitting", {
params ["_unit","_channel","_volume","_message","_identity"];
// _channel can be: "group","command","side","vehicle","global","custom" // _volume : the must: returning value at end of EH overrides the current volume (like for handleDamage) // _message if any (from cfgRadio), empty string if player's voice // _identity if any, like "PAPA_BEAR","BASE","HQ"...
}];
- and/or as MEH
addMissionEventHandler ["RadioMessage", {
params ["_unit","_channel","_volume","_message","_identity"];
}];
With same possibilities.
A cool practice could be:
addMissionEventHandler ["RadioMessage", {
params ["_unit","_channel","_volume","_message","_identity"]; if (side _unit == playerSide) then { _volume = (10000 / (_unit distanceSqr player)) min 1; }; _volume
}];
Thanks