Author: phronk
Author Website:

Requirements: No addons required

Version: 0.8

Short description: 'Addon-Free ArmA Radio' is a script which enhances the in-game VON by adding simple radio effects when communicating with other players, while factoring distance between the sender/receiver of the transmissions.

Date: 2017-11-22 21:16


Comments: (5)
Rating:



 



Addon-Free ArmA Radio

by
phronk


Description:
'Addon-Free ArmA Radio' is a script which enhances the in-game VON by adding simple radio effects when communicating with other players, while factoring distance between the sender/receiver of the transmissions. This script does not require any addons and setup is easy.


Features:
Doesn't require any mods
Script will initialize only if TFAR / ACRE2 isn't enabled by the host and the AFAR lobby parameter is enabled
Tiny file size
Admin/Clients don't have to download ANYTHING extra to play your mission
No custom sounds; radio sounds are audio files pulled through the game
Default "ItemRadio" is used for VON comms
The 3D radio is an inanimate radio object already in Arma 3
Adds interesting depth to VON, which it has lacked for so long
Transmitting over VON channels will also broadcast a radio bleep/noise for all friendlies in range with a radio
Radio noise gets louder based on distance, until out of radio range
Compatible with land, sea, and air vehicles
More information in the "ReadMe.txt"


Installation / Usage:
For usage instructions and information of how to use the Addon-Free ArmA Radio please refer to the included documentation and/or example mission.


Media:



Armaholic.com has its own Youtube channel where we will cover the Community made releases.
Subscribe to the Armaholic.com Youtube channel


Known issues:
• Mouse buttons not supported (LMB, MMB, and RMB)
• Not Zeus compatible
• Talking on radio while reloading plays animation and deletes new magazine (Radio animation feature is disabled by default to avoid this bug)


Future plans:
Allow clients to set a different radio keybind other than CAPS LOCK
Add more settings to easily configure
Add long range radio item (Using in-game content)
Add radio interface to handle personal radio setup
Disable radio if incapacitated *WIP*


License / Disclaimer:
As author of this script, I grant permission to all scripters/mission designers to modify this mission to their liking for PERSONAL USE.
This includes granted permission to individuals and ArmA groups to host a mission using the script on a server. HOWEVER, I DO NOT consent publishing ANY VERSION of the script as their own.

If you've made major changes to the script and wish to publish it, PLEASE CONTACT ME FIRST FOR PERMISSION TO BE GRANTED!


Credits & Thanks:
v0.8
ADDITIONS:
• Added: New "Spectator channel" (Only works with Spectator respawn template)
• Added: New "Take" eventHandler: calls r_allOn function upon picking up radio
• Added: New "r_RTO" function: handles Support channel adding/removing
• Added: New "Fuzz3" function: handles Support channel's radio noise
• Added: New "S_In1" function: Support channel's "in" function for vehicles
• Added: Player's channel is set to Direct upon respawn
• Added: Player's channel is set to Direct when talking in a channel he shouldn't
• Added: Blackheart_Six credited for helping test AFAR
• Added: PRYMSUSPEC credited for helping test AFAR

ADJUSTMENTS:
• Updated: Arma Radio's Instructions Manual briefing information
• Changed: "Fuzz2" function now handles Command channel's radio noise
• Changed: Squad leaders no longer have forced access to Support channel
• Changed: Support Channel is available to anyone with the "RTO" unitTrait
• Changed: Rewrote some of the "getIn" and "getOut" eventHandler code
• Changed: Gunners aren't auto-granted access to Support channel
• Changed: Boat crews aren't auto-granted access to Support channel
• Changed: Vehicles with horns aren't auto-granted access to Support channel
• Changed: AFAR animation is disabled by default, in the CFG.sqf
• Tweaked: Reduced max AI alert radius around talking player to 9m, down from 15m
• Tweaked: If player talks with 0 players on his side, channel is set to Direct
• Tweaked: Support Channel is now labeled "Support channel" (Lower-case "C")
• Tweaked: Added "r_" prefix to some functions for consistent naming conventions

FIXES:
• Fixed: "Fuzz2" function wasn't working
• Fixed: Radio interface buttons were misplaced if interface size wasn't "Small"
• Fixed: Spectators could talk in all channels (A3 Respawn Template)
• Fixed: Script wasn't TeamSwitch compatible
• Fixed: Static Weapon gunners were getting access to Support channel
• Fixed: "Put" eventHandler was calling "allOn" function, when killed
• Fixed: Channels would disable when player moved a radio, while one was assigned
• Fixed: Cycling channels in radio interface didn't work correctly, if not a group leader
• Fixed: Array of players now only collects players within radio range
• Fixed: A couple if()then{ structures were setup incorrectly, causing errors
• Fixed: Fragmented brackets were misplaced at end of "vOut" function
• Fixed: Renamed RscText and RscButton to avoid mod/script conflicts

OPTIMIZATIONS:
• Optimized: "Fuzz2" function has a few less if()then{ structures in it
• Optimized: Removed redudnant check if player distance > 0
• Optimized: Removed redundant "case(_x distance > maxRange):do{};"
• Optimized: Removed redundant Support channel activation in AFAR "init.sqf"
• Optimized: Removed redundant argument when calling "allOn" function
• Optimized: Removed redundant argument when calling "allOff" function
• Optimized: Removed redundant called sort function in "out" functions
• Optimized: Removed redundant "_d1" variable, in "out" functions
• Optimized: Removed redundant "_c" variable from "out" functions
• Optimized: Removed redundant "_this" variable, in displayEventHandlers
• Optimized: Removed redundant "RscPicture" from "defines.hpp"
• Optimized: Renamed "blockVON.sqf", to "noVON.sqf"
• Optimized: Renamed "seeAFAR", to "r_3DR"
• Optimized: Renamed "anAFAR", to "r_Anm"
• Optimized: Cleaned up some unneeded placeholder comments

REMOVALS:
• Replaced: "S_In" with "S_In0": Support channel's "in" function for infantry
• Replaced: "r_sortD" function with BIS_fnc_sortBy
• Removed: Squad leader requirement from Support channel
• Removed: Randomization from enemy AI alert radius, when player is talking
• Removed: CH6,CH7,CH8 variables from r_CH variable, in the CFG.sqf

v0.71
Fixed: Script error related to incorrect use of count command
Fixed: Whenever Support Channel was disabled/removed, Group would also disable
Fixed: allOff function was broken

v0.7
RADIO SCRIPT: Phronk + davidoss
• RADIO MODEL: Bohemia Interactive
• RADIO AUDIO: Bohemia Interactive
Changelog:
Added: Max short-range radio range setting to the CFG.sqf
Added: Max long-range radio range setting to the CFG.sqf
Added: 2 more static sounds to SFX.hpp, which are slightly louder
Added: Arma Radio's Instructions Manual now shows max effective range
Added: New "allOff" function to disable all radio channels
Added: New "r_alert" function, which alerts nearby enemy AI when talking
Added: New setting to disable/enable the new AI alert function
Added: Player notification to set a Diary keybind, if one is not detected
Added: Player notification to set a PushToTalk keybind, if one is not detected
Added: Player notification to unbind VoiceOverNet keybind, if one is detected
Updated: Arma Radio's Instructions Manual with more information
Changed: Radio ranges are calculated differently
Tweaked: Increased default max short-range radio range to 2000, up from 1200
Tweaked: Increased default max long-range radio range to 6000, up from 4000
Tweaked: Two extra static stages to Fuzz.sqf, when near max radio range
Tweaked: "_c" variable is now reset to objNull, instead of an empty string
Tweaked: Reorganized some code in the AFAR\init.sqf
Fixed: Removed debug info whenever pressing/releasing a PushToTalk key
Fixed: Player on ground could not transmit to a pilot via Support Channel
Fixed: Support Channel wasnt disabled for everyone if less than 2 players active
Fixed: Support Channel would disable all channels if outside radio range
Fixed: Support Channel for other factions was sometimes available to the player
Fixed: Script error related to the custom Support Channels' initialization
Fixed: Radio channel disabling in all channels is more consistent
Fixed: Command Channel would disable all channels if outside radio range
Fixed: Corrected mispelled word "receive" in briefing / comments
Optimized: Radio channels are disabled via new "allOff" function
Optimized: Removed redundant distance check in all radio "In" functions
Optimized: Removed redundant block of code in "Fuzz.sqf"
Optimized: Removed redundant block of code in "Fuzz2.sqf"
Removed: Unused isAFAR publicVariable
Removed: KillzoneKid from credits (Contribution no longer relevant)

v0.6
ADDITIONS:
• Added: Long-range radio interface
• Added: Support Channel for each side (WEST, EAST, INDEPENDENT)
• Added: Locality check at beginning of script initialization
• Added: New "Fuzz2" function which handles long-range radio static
• Added: Function which completely blocks VoiceOverNet keybind/input
• Added: Function to handle proper enabling of radio channels
• Added: sc to credits

ADJUSTMENTS:
• Updated: Arma Radio's Instructions Manual briefing
• Tweaked: MPKilled/MPRespawn eventHandlers are no longer MP eventHandlers
• Tweaked: MPKilled/MPRespawn eventHandlers now refer to _PLR instead of player
• Tweaked: Increased volume of radio squelch noises
• Tweaked: Radio interface is no longer moveable
• Tweaked: Radio interface shows long-range radio, if player is a:
Squad Leader
Pilot (Copilot not yet supported)
Gunner
Commander
FIXES:
• Possibly Fixed: Persistent static bug
• Fixed: "Locality" bug
• Fixed: Array of players nearby is now sorted from nearest to farthest
• Fixed: All channels disabled/enabled upon death/respawn
• Fixed: All channels properly disable if player talks while unable to breathe
• Fixed: Radio/static is now deleted properly, when entering/exiting a vehicle
• Fixed: Radio squelch when talking without a radio
• Fixed: Instance where keyUp/keyDown eventHandlers weren't reset properly

OPTIMIZATIONS:
• Optimized: AFAR no longer uses a custom texture (70kb) for interface
• Optimized: Players outside of radio range are now disregarded in the Fuzz.sqf
• Optimized: _this variable is used instead of [player], in eventHandlers
• Optimized: getInMan / getOutMan eventHandlers
• Optimized: Channels are now collectively disabled, using count
• Optimized: Replaced [array]+[array], with [array]append[array] in Hush.sqf
• Optimized: Replaced MPKilled MPeventHandler with Killed eventHandler
• Optimized: Replaced MPRespawn MPeventHandler with Respawn eventHandler
• Optimized: Removed surfaceIsWater check
• Optimized: Removed several redundant getPos commands
• Optimized: Removed redundant argument from several calls/execVM's
• Optimized: Removed comments from a few scripts

REMOVALS:
• Replaced: Radio interface's custom texture with an in-game model
• Replaced: Side Channel with Support Channel
• Replaced: [player] variable with _this, in eventHandlers
• Removed: Redundant [player] argument for init scripts
• Removed: AFAR mission lobby parameters
• Removed: paramsArray references in code for easier implementation
• Removed: Channel check at beginning of Fuzz.sqf
• Removed: Global Channel
• Removed: enableChannel 6
• Removed: ^v^v^v^v^v^ broken signal from Long-Range "Fuzz2" function
• Removed: VoiceOverNet inputAction keyDown/Up eventHandlers
• Removed: "VONin" and "VONout" functions
• Removed: fadeSpeech command from scripts

v0.5
ADDITIONS:
• Added: Simple 2D radio interface (Custom texture is temporary)
• Added: Cycle through previous/next VON channels via nobs on radio interface
• Added: Script setting to toggle 3D radio when talking
• Added: Script setting to toggle player animation when talking
• Added: Blocked usage of VoiceOverNet keybind *WIP*
• Added: Player is notified that he needs a rebreather to speak, if underwater
• Added: Reintroduced the auto-side detection and "r_PS" variable
• Added: Functions check for the player's unit classname and side
• Added: Function to handle radio animation better
• Added: Fuzz function deletes radio noise if player is beyond 1200 meters
• Added: Switching channels via radio menu resets channel permissions (Test)
• Added: Unique local variable to handle element in "Fuzz" function
• Added: More information to AFAR Instructions manual
• Added: BadBenson to credits
• Added: DirtySanchez to credits
• Security: Defined AFAR's functions under CfgRemoteExec in the Description.ext
• Security: AFAR's functions now initialize via comileFinal preprocessFile
ADJUSTMENTS:
• Changed: Side channel is disabled by default
• Changed: AFAR has been completely reorganized
• Merged: Vehicle channel permissions reorganized
• Merged: Code which initializes scripts/functions now in its own init script
• Moved: Separated all the configurable settings into the "CFG.sqf"
• Tweaked: Simplified installation of AFAR
• Tweaked: Vehicle chat should only work if you're in a vehicle
• Tweaked: Variables are set in more appropriate areas of code
• Tweaked: Functions use a unique "_nearP" variable
• Tweaked: Player does not grab radio while aiming down sights anymore
• Tweaked: Adjusted some settings in demo mission
FIXES:
• Fixed: Common instance that caused radio noise to persist until respawn
• Fixed: Talking on radio while in a vehicle caused static bug
• Fixed: "Hush" function no longer deletes 3D radio
• Fixed: "_nearP" variable should be reset more reliably now
• Fixed: Only group leaders can communicate via Command channel
• Fixed: "MPKilled" eventHandler is now set to "Killed"
• Fixed: Demo mission would force player to respawn upon connecting
OPTIMIZATIONS:
• Optimized: Replaced private["_var1"] with private _var1
• Optimized: Replaced set command with pushBack
• Optimized: Replaced getPos command with getPosWorld
• Optimized: createVehicleLocal getPos player changed to createVehicleLocal[0,0,0]
• Optimized: Removed detach command when deleting radio/static
• Optimized: Initialization of KeyUp eventHandlers
• Optimized: "r_WS" variable is no longer a public variable
• Optimized: 3D radio is no longer created while talking in a vehicle
• Optimized: Simplified "eventHandler" to "EH" in comments
• Optimized: Deleted function/variable classification from comments
• Optimized: Demo mission's .sqm is now binarized
REMOVALS:
• Replaced: Side channel with Command channel by default (Side may return later)
• Replaced: "r_WS" code/variable moved to AFAR's init
• Removed: initPlayerLocal.sqf is no longer used
• Removed: Useless "debug" object from demo mission

v0.4
ADDITIONS:
• Added: Side, Command, Group, Vehicle, and Direct channel is fully supported
• Added: Every VON channel has its own PushToTalk eventHandlers
• Added: GetInMan/GetOutMan eventHandler to toggle Vehicle channel
• Added: Higher pitch radio "in" sound for Command channel
• Added: Distance check to radio "in" functions
• Added: Distance check to radio "out" functions
• Added: Animation of character using radio, when player talks on radio
• Added: Speech volume is set to 0% upon death
• Added: Speech volume is set to 100% upon respawn
ADJUSTMENTS:
• Changed: Sounds are now defined in new "SFX.hpp", instead of Description.ext
• Changed: Renamed "rFN.sqf" to "f.sqf"
• Changed: "Fuzz" function variables renamed to avoid repetition conflicts
• Tweaked: "Fuzz" function's initial player check
• Tweaked: "Fuzz" function checks if player is alive, instead of isAbleToBreathe
• Tweaked: Each channel's privileges are handled independently
• Tweaked: Improved player distance check
• Tweaked: Reduced maximum radio range to 1200, down from 2000
• Tweaked: Increased volume of static
• Tweaked: Global/Direct channel cannot create radio static
• Tweaked: Vehicle channel is disabled when no other player on your side
• Tweaked: Variables are all private
FIXES:
• Fixed: Distance check's array of near players wasn't reset upon keyRelease
• Fixed: Players outside of radio range would still hear radio sounds
• Fixed: Static/floating radio when player disconnects during a radio transmission
• Fixed: Script error when a dead player tried to speak
• Fixed: Corrected in-game AFAR instructions briefing
• Fixed: Corrected information in ReadMe.txt
OPTIMIZATIONS:
• Optimized: Removed redundant vehicle player check when removing attached objects
• Optimized: Checks if players nearby are alive/same side in same line of code
• Optimized: GetIn/Out eventHandlers are added on init, instead of every keyPress
• Optimized: Talking in Vehicle channel
• Optimized: currentChannel check for the radio "in" functions
• Optimized: Improved use of remoteExec
• Optimized: Improved radio's "Fuzz" function
• Optimized: Improved radio's "In" functions
• Optimized: Renamed "_plAFAR" variable to "_nearP" (nearPlayers)
• Optimized: Deleted unused "_fz" variable
• Optimized: Deleted a few lines of redundant code
• Optimized: Deleted redundant "isDedicated" check in "init.sqf"
REMOVALS:
• Replaced: onPlayerKilled and onPlayerRespawn scripts with eventHandlers in "f.sqf"
• Removed: Player count variables from script
• Removed: Useless initial distance check for radio "in" function
• Removed: Useless array of player distances
• Removed: Useless "_dlAFAR" and "_dAFAR" variables
• Removed: Useless call in the "KeyUp" displayEventHandler on init
• Removed: Redundant "_plAFAR" variable from "Fuzz" function
• Removed: Redundant surfaceIsWater check in beginning of each function
• Removed: "_rEH" local variable holding getInMan/getOutMan eventHandlers
• Removed: Some comments from script
• Removed: rob223344 from the credits; contribution not used
• Removed: Credits from Instructions Manual briefing

v0.3
ADDED:
• Added: Automatically detects your in-game "Push To Talk" keybind
• Added: Larrow to credits; suggested inputAction command
ADJUSTMENTS:
• Tweaked: Radio only checks for friendly players (AI not supported)
FIXED:
• Fixed: Players in vehicles couldn't directly receive transmissions
• Fixed: Players could hear radio key-ups of players beyond radio range
• Fixed: Your 3D radio would get hidden when someone else stopped talking on radio
• Fixed: Radio noise / 3D radio weren't deleted efficiently
• Optimized: Rewrote how script references source of sender/receivers when handling distances
• Optimized: Distance check uses switch structure, instead of if()then{exitWith{};};
• Optimized: Radio checks distance once on keyPress, instead of 8 times
• Optimized: Removed vehicle player reference in distance check
• Optimized: Deletion of attached radio effects to player
• Optimized: 3D radio / noise attaching/detaching to players
• Optimized: Detection of whether player is in a vehicle or not
• Optimized: Shortened comments and positioned them better in script
• Optimized: Filesize of script reduced to 14kb, down from 20kb
REMOVED:
• Removed: Davidoss and R3vo from credits; contributions not used

v0.2
ADDED:
• Added: Contribution credits via comments at bottom of script to Davidoss, R3vo, rob223344, and Killzone_Kid
ADJUSTMENTS:
• Tweaked: Player sending radio traffic cannot hear himself transmit static anymore
• Tweaked: Added "r_" prefix to most variables/functions to avoid possibility of conflicting with other script functions
FIXED:
• Fixed: Script now selects 1, instead of 0 from the entities check list to avoid player receiving himself
• Fixed: Description.ext in demo mission had a typo, breaking the mission
REMOVED:
• Removed: Redundant "else" switch structure in init.sqf

v0.1
Initial release


Forum topic:
- BI forums


Steam Workshop:
- Subscribe




Enable javascript to be able to download from Armaholic please!



Tags: Communication,   Effects,   Enhace,   Framework,   Radio,   Scripts,   Simulation,   Sound,   Von