Jump to content

Recommended Posts

iPvmdio.png

 

 

DESCRIPTION:

This is a script which enhances the in-game VOIP by adding radio effects when communicating with other players, while factoring distance during transmissions.  No mods or third-party programs required.  Setup is easy!

 

 

 

VIDEO: (Very outdated, will recreate soon™️)

 

SCREENSHOTS:

Spoiler

4dusg0G.jpg

CZirWFN.jpg

Snp9l35.jpg

DU7As3X.jpg

 

 

 

FEATURES:

  • Doesn't require any mods
  • Doesn't require any third-party programs
  • Script will initialize only if TFAR & ACRE2 aren't enabled
  • Tiny file size (130 KB)
  • No performance impact
  • Admin/clients don't have to download anything to play your mission

  • No custom files; AFAR reuses all Arma content

  • Adds interesting depth to VOIP, which it has lacked for so long
  • Using VOIP in-game will broadcast radio noise to friendlies with a radio within radio range
  • Players not in range cannot hear you or your radio noise
  • Incapacitated / dead players cannot use radio (Optional)
  • Compatible with land, sea, and air vehicles
  • Compatible with Arma's End Game respawn templates
  • Compatible with Arma's End Game Spectator
  • Compatible with Arma's Dynamic Groups
  • Compatible with Zeus
  • Easy to configure with the "AFAR\CFG.sqf"
  • In-game radio interface includes options to customize settings locally
  • More information in the "ReadMe.txt"

 

 

TO DO LIST:

  • Voice clipping due to signal interference
  • Release a separate standalone mod version

 

 

KNOWN BUGS: (Upcoming Change-Log)

  • High ping players, server, or desync can cause code delays

  • AFAR's displayEventHandlers are paused for client, while a display other than 46 or 312 is active

 

 

CREDITS:

    • Phronk:  Script Creator
    • Bohemia Interactive:  Radio model, audio, animation, and BIS_fncs

 

    CONTRIBUTIONS:

          • Dedmen:  Added important VON script commands to Arma 3

          • DirtySanchez: Helped organize functions

          • Metalman [EXP]: Helped optimize code initialization

 

    TESTERS:

          • Genesis92x

          • Harris

          • LightHouse

          • MorpheousMike

          • Moser

          • newgen

          • PRYMSUSPEC

          • Task Force Ronin

 

INSTALLATION:

 
  1. Extract the "AFAR" folder from the downloaded file to your desired mission folder.
    Example: "C:\My Documents\Arma 3 - Other Profiles\Phronk\missions\AFAR_demo.Stratis"


     
  2. Copy and paste the following code into your mission's "init.sqf" file:

    []spawn compileFinal(preprocessFile"AFAR\init.sqf");

     


      3. Copy and paste the following code into your mission's "Description.ext" file:
#include "AFAR\UI\defines.hpp"
#include "AFAR\UI\dialogs.hpp"

 

    class CfgSounds {
#include "AFAR\f\SFX.hpp"

sounds[]={};
    };

 

 


Radio settings located in "AFAR\CFG.sqf" file. Make sure to set your in-game PushToTalk keys and VON volume. Done!

 

 

(03SEP2021) - v0.98
Download Link (Google Drive)

Download Link (Steam Workshop)

Download Link (Armaholic)

 

CHANGE-LOGS:

 

(03SEP2021) - v0.98

  • Added: Compatibility with the new SOG:PF CDLC radio backpacks
  • Added: Compatibility with the new SOG:PF CDLC radios
         + Can only use your own side's radios (Enemy radios give no benefit)
  • Added: Radio range extends to 9600m when in a military vehicle
         + Only while in the Driver seat, any turret, or first cargo seat
     
  • Tweaked: Reduced VON volume check to 10%, down from 50%
  • Tweaked: SystemChat messages on init are now more obvious
     
  • Fixed: SOG:PF aircrew slots weren't recognized
  • Fixed: Detection of player's living/breaking status on KeyPress & KeyRelease
  • Fixed: Dead and unable-to-breathe players could transmit squelches
  • Fixed: Detection of radio backpack
  • Fixed: Dropping radio backpack isn't properly detected
  • Fixed: Outdated reference to unused "r_dis" global variable in "up.sqf"
     
  • Optimized: CUP & SOG:PF RTO backpacks removed from "r_RTOBP" unless detected
  • Optimized: RemoteExec JIP queue
  • Optimized: isAbleToBreathe checks on keypress/release
  • Optimized: Wrapped condition in the "hasRadio.sqf" with parenthesis
     
  • Replaced: N/A

 

 

(01MAR2021) - v0.97

  • Added: Distance and terrain factors impact radio interference

  • Added: Volume control knob to radio interface

  • Added: "vol.sqf" script to handle local radio volume for players

  • Added: "volu.sqf" script to scale squelch and noise volumes

  • Added: Volume knob handles radio VON, squelches and noise

  • Added: Custom squelch-out noise for receiving players (+4kb)

  • Added: Beep noise when clicking "Mode" button on radio interface

  • Added: Radio interface can now be dragged around screen, position is cached

  • Added: Dropping radio will reset cached radio UI position
     

  • Changed: Radio range is dictated by radio used, instead of channel

  • Improved: Positioning/scale of radio interface across more screen varieties

  • Merged: Scripted radio screen controls into "dialogs.hpp"

  • Tweaked: Buttons are highlighted first few times you open the radio

  • Tweaked: Squelches are only audible to client who is transmitting

  • Tweaked: Increased long-range radio range from 8000m to 9600m

  • Tweaked: Reduced short-range radio range from 3500m to 3200m

  • Tweaked: Moved spawning of global squelch/noise code to "d.sqf"

  • Tweaked: Opening radio while dead now switches you to Spectator channel

  • Tweaked: '_p' is no longer a private variable in "M_In.sqf"

  • Tweaked: Condensed help text in radio UI
     

  • Fixed: Check for radio or RTO backpack was broken in "d.sqf"

  • Fixed: Talking in Spectator channel while respawning would soft-break AFAR

  • Fixed: Opening radio when in Global channel would block channel switching

  • Fixed: AFAR init muted Speech volume, which muted sounds like Tactical Ping

  • Fixed: Players without a radio still heard VOIP in channels other than Direct

  • Fixed: Radio no longer on top of "Press 'Esc' key to put away radio" text
     

  • Optimized: Changed backpack to unitBackpack in multiple scripts

  • Optimized: Squelch-outs no longer checks receiver's incapacitated state

  • Optimized: All controls are committed within a forEach, instead of individually

  • Optimized: Replaced code to check for radio with 'r_rC' function in "out.sqf"
     

  • Replaced: 3D radio with a 2D image of a AN/PRC-148 Thales radio (+65kb)

  • Replaced: Global squelch-out sound with more realistic end of transmission noise

  • Removed: "Toggle 3D pop-up radio" option from AFAR options menu

  • Removed: RscTitles reference from "Description.ext"

  • Removed: "titles.hpp"

  • Removed: "3DLR.sqf"

  • Removed: r_3DR global variable

  • Removed: Placeholder comments in UI code


     

(06FEB2021) - v0.96a

  • Added: Some initialization debug info to be logged to RPT
     
  • Tweaked: Changed the radio help icon image and its position
     
  • Fixed: Custom channels weren't being created
  • Fixed: Headless-client and JIP compatibility checks had too many parenthesis
  • Fixed: Forced script to waitUntil custom channels are created to avoid errors
  • Fixed: Clicking the radio help icon by mistake would block the knob function
  • Fixed: Typo in Arma Radio Instructions Manual briefing
     
  • Optimized: Improved getPlayerUID code by merging variable code in "fuzz.sqf"
     
  • Removed: N/A



(30OCT2020) - v0.96

  • Added: Reintroduced distance factors!
  • Added: Opening radio UI will fix broken eventHandler variables, if detected
  • Added: Player is given an "ItemRadio" upon init
  • Added: Icons to screen on radio representing current channel permissions
  • Added: Icon to screen on radio representing signal strength
  • Added: Icon to screen on radio representing battery (Cosmetic)
  • Added: "PT" and "FM" text to bottom of radio screen (Cosmetic)
  • Added: Modified sound effect for cycling channels on radio
  • Added: Upon init, player is notified to raise their VON volume if it's below 50%
  • Added: Speech volume is set to 100% upon init (Unsure if it even does anything)
  • Added: Mouse cursor is moved to center of screen when radio interface is opened
  • Added: Arma Radio's Instruction Manual includes info about radio ranges
     
  • Changed: Radio noise no longer changes by distance, time of day, or weather
  • Changed: Repositioned the cycle channels button to the correct knob on radio model
  • Changed:  Font of radio text to "LCD14", instead of "LucidiaConsoleB"
  • Improved: JIP compatibility
  • Improved: Arma Radio's Instructions Manual fits briefing window slightly better
  • Improved: Admin is muted globally, if speaking in Global channel and can't breathe
  • Improved: AFAR initializes much faster now
  • Improved: The cycle channel knob is much more responsive
  • Merged: 'fuzz2.sqf' with 'fuzz.sqf'
  • Merged: "Next Channel" and "Previous Channel" radio UI buttons into one
  • Merged: r_mCHName and r_mCHShort into one global variable
  • Tweaked: Increased volume of all radio effects
  • Tweaked: Height and width of text in radio UI to fit in the radio screen better
  • Tweaked: Ear icon in the AFAR Information briefing is now smaller to fit better
  • Tweaked: Help text pop-up when opening radio is now aligned to the right
  • Tweaked: Adjusted the order some code is executed in all of the "in" functions
     
  • Fixed: Old Arma VON bug which would block a specific player from being audible
  • Fixed: "r_f" global variable is reset more reliably on death now
  • Fixed: Side channel did not process PushToTalk functions properly
  • Fixed: Cycling channels via keybinds when chOn is true now works properly
  • Fixed: Functions would break if default setting for r_incap was changed
  • Fixed: Parameters weren't always being passed to "out2.sqf"
  • Fixed: East faction's RTO channel wasn't using custom variables from 'CFG.sqf'
  • Fixed: Custom channel displays correct text in radio UI, instead of "SUPPORT"
  • Fixed: Detection of whether player could or couldn't breathe underwater
  • Fixed: Radio UI and channel switching wasn't fully supported in Zeus
  • Fixed: Handling of r_incap and r_sideCH variables
  • Fixed: "Show Chat" option now toggles chat visibility, instead of radio messages
  • Fixed: Arma Radio's Instruction Manual didn't always initialize for JIP
  • Fixed: Exiting a vehicle would switch you to Group channel
  • Fixed: Exploit that allowed players to switch channels while in the Escape menu
     
  • Optimized: Collection of players in group for 'G_In.sqf' (31% faster)
  • Optimized: Collection of leaders for 'C_In.sqf' (10% faster)
  • Optimized: Check if player is in a vehicle for 'V_In.sqf' (10% faster)
  • Optimized: Removed some extra channel checking code from the next/prev channel functions
  • Optimized: Removed excess parenthesis in 'fuzz.sqf'
  • Optimized: Removed redundant placeholder variable from "Killed" eventHandler
  • Optimized: Removed redundant font changes in radio interface code
  • Optimized: Replaced apply with forEach (5% faster)
  • Optimized: Replaced code for playing more static during rain with simpler code
  • Optimized: Replaced preprocessFile with loadFile when initializing some scripts
  • Optimized: Replaced !isServer with didJIP in headless client check
  • Optimized: Replaced hasInterface&&isNull player with didJIP
     
  • Removed: "Next Channel" button from the radio UI
  • Removed: "Previous Channel" button from the radio UI
  • Removed: "Put away radio" button from the radio UI
  • Removed: 'fuzz2.sqf'
  • Removed: 'snd.sqf'
  • Removed: Rain, overcast, and sun interference factors
  • Removed: All variations of radio noise effects from 'SFX.hpp' (Only 1 is used)
  • Removed: All comments from scripts, except from 'init.sqf' and 'CFG.sqf'(05JUL2020) - v0.95

 

  • Added: Option to allow players to use radio while incapacitated

  • Added: Mouse button inputs now block PushToTalk keybinds

  • Added: Text advising player to equip a radio, if trying to talk without one
     

  • Tweaked: "fuzz.sqf" & "fuzz2.sqf" now takes incapacitation into consideration

  • Tweaked: Replaced name with getPlayerUID in fuzz functions and "out.sqf"
     

  • Fixed: Code didn't block talking in radio channels without a radio equipped

  • Fixed: Radio UI would pop-up from channel switch keys, when r_chOn is enabled

  • Fixed: Issues when multiple players connected with the same name

  • Fixed: Script error upon being killed, due to invalid argument with "r_out2"

  • Fixed: Possible script error due to inconsistent disabling of Spectator channel
     

  • Optimized: N/A
     

  • Removed: Text pop-up when pressing channel switch keybinds

     

(11MAR2020) - v0.94a [HOTFIX]

  • Added: "r_RTOBP" global variable to 'CFG.sqf' (Add backpacks to RTO check)
     
  • Tweaked: Attempted to open radio UI while it is already open will close it
     
  • Fixed: EventHandlers and "r_dn_" wouldn't reset upon respawning

  • Fixed: After respawn, unable to switch radio channels via radio interface

  • Fixed: Radio text showed "true" instead of actual current radio channel

  • Fixed: Talking in Spectator channel would break PushToTalk eventHandlers

  • Fixed: Potential script error related to undefined "r_up_" global variable
     

  • Optimized: Removed more unnecessary semi-colons
     

  • Removed: Suspended code from Respawn eventHandler


 

(07MAR2020) - v0.94

  • Added: waitUntil in beginning of code init for JIP compatibility

  • Added: Support for CUP radio backpacks

  • Added: Side channel support (Optional, disabled by default)

  • Added: "r_sideCH" global variable to 'CFG.sqf'

  • Added: "r_mCH" global variable to 'CFG.sqf' (Used for modified "Air Channel")

  • Added: New function 'hasRadio.sqf' which checks player if they have a radio

  • Added: If "r_chOn" = FALSE, using cycle channel keybind will open radio UI

  • Added: Radio interface shows which channel you are currently in

  • Added: Player is given a radio upon connecting, if no radio equipped
     

  • Improved: AFAR briefing information

  • Changed: Channel switching keybinds are disabled by default

  • Tweaked: Script no longer initializes on headless clients

  • Tweaked: "r_CH" global variable is now a publicVariable

  • Tweaked: "dn.sqf"/"up.sqf" do some basic checks, instead of each channel script

  • Tweaked: "Air Channel" refers to the new "r_mCH" variable, instead of "r_sCH"

  • Tweaked: Arma Radio briefing shows info corresponding with 'CFG.sqf' variables

  • Tweaked: Default "Air Channel" in 'CFG.sqf' is now "Air channel"
     

  • Fixed: JIP issues related to player and "r_p" variable

  • Fixed: Zeus eventHandlers caused leak, gradually degrading FPS

  • Fixed: Typo in 'S_In.sqf' ("_ap" should now be "_p")

  • Fixed: "_p" variable was undefined in some scopes

  • Fixed: All caps TRUE/FALSE values in 'CFG.sqf' are now lower-case

  • Fixed: Script error related to serialization of "r_dis" variable

  • Fixed: Script error related to improper admin check

  • Fixed: 'out2.sqf' was still referencing the outdated "RTO" unitTrait

  • Fixed: 'noCHS.sqf'

  • Fixed: 'prevCH.sqf' / 'nextCH.sqf' could switch to own channel
     

  • Optimized: Merged check for "ItemRadio" / radio backpack into a small function

  • Optimized: Method custom radio channels' variables are made into publicVariables

  • Optimized: Removed many unnecessary semi-colons
     

  • Removed: "r_RTO" global variable (Add radio backpack to unit for RTO capability)

  • Removed: Redundant params["_c"] from 'out2.sqf'

  • Removed: Redundant exitWith code at beginning of 'sOut.sqf'

     

(24AUG2019) - v0.93

  • Added: Zeus Compatibility
  • Added: 'r_sCHName' global variable to 'CFG.sqf'
  • Added: 'r_sCHShort' global variable to 'CFG.sqf'
     
  • Updated: AFAR Instructions Manual in map briefing
  • Updated: readMe.txt
  • Changed: Air channel checks for radio backpack, instead of variable/ItemRadio
  • Changed: r_RTO variable simply adds RTO backpack to player unit on connect
  • Tweaked: Scripts check for "ItemRadio" or RTO backback equipped
  • Tweaked: ArmA Radio briefing is visible in map briefing prior to mission start
  • Tweaked: ArmA Radio briefing also uses custom name for "Air Channel" if set
  • Tweaked: Air channel's name can be changed via 'r_sCHName' in 'CFG.sqf'
  • Tweaked: Air channel's text by player name can be changed via 'r_sCHName' in 'CFG.sqf'
     
  • Fixed: Code only executed for channel you had selected, ignoring keybinds
  • Fixed: Missing ; and } in 'anim.sqf' (Radio Animation)
  • Fixed: Command channel sender didn't hear his radio squelch in
  • Fixed: Undefined variable 'ch9' script error, if Spectator template not used
  • Fixed: Script error in AFAR "Put" and "Take" eventHandlers
  • Fixed: Serialization script error on script init
  • Fixed: Channels stay off until respawn if you talk underwater without rebreather
  • Fixed: Typo in ArmA Radio briefing
     
  • Optimized: Replaced execVM with 'compileFinal(preprocessFile"")'
  • Optimized: Replaced '_dik' with _this in 'noCHS.sqf'
  • Optimized: 'noCHS.sqf'
  • Optimized: VON blocker code is called only when pressing the VON keybind
  • Optimized: Removed redundant code from VON blocker code
  • Optimized: Removed a redundant alive check in 'g_out.sqf'
  • Optimized: Removed some redundant publicVariables
  • Optimized: Removed redundant player==player check in script init
     
  • Removed: "RTO" unitTrait variable
  • Removed: Removed global/publicVariables "ch#Name"
  • Removed: Unused placeholder code for terrain interference
  • Removed: 'noVON.sqf'

     

(04JUL2019) - v0.92

  • Added: "PlayerViewChanged" missionEventHandler for unit switch compatibility
     

  • Tweaked: Increased squelch volume from +7 db to +10 db

  • Tweaked: Radio squelch-out sound is played, if radio static present

  • Tweaked: 'r_CH' is defined in the AFAR init, instead of 'CFG.sqf'
     

  • Fixed: 'c_out.sqf' was referring to _x in remoteExec'd code, instead of 'r_p'

  • Fixed: 'c_out.sqf' was adding radio noise, instead of squelching out

  • Fixed: 'c_out.sqf' had an undefined '_p' variable in an "else" scope

  • Fixed: Persistent radio static if forced into Direct channel while transmitting

  • Fixed: Persistent radio static if killed while transmittingFixed: Corrected a code syntax in 'g_in.sqf'

  • Fixed: Spectator & Air channel didn't properly reset upon death/respawn (Again)

  • Fixed: Pop-up radio is hidden when player releases talk key in Direct channel
     

  • Fixed: Undefined variable 'ch9' script error, if Spectator respawn template not used
     
  • Optimized: Shortened script name of 'useRadio.sqf' to 'ui.sqf'
  • Optimized: Removed displayEventHandler's global variable 'r_myRadio'
  • Optimized: Removed displayEventHandler's global variable 'blockVON'
     
  • Removed: Some comments from 'AFAR\f\init.sqf'


 

(03JUN2019) - v0.91

  • Added: Reload eventHandler; workaround to fix the AFAR reload bug

  • Added: EventHandler which blocks NextChannel/PrevChannel keybinds

  • Added: Setting in 'CFG.sqf' which can block nextChannel/prevChannel keybinds

  • Added: 'out2.sqf' : Disables current channel before setting to another channel

  • Added: Code exits if speaking in Global, Side, or Spectator channel
     

  • Tweaked: Enabled radio animation by default

  • Tweaked: Comments in 'AFAR\f\init.sqf'

  • Tweaked: Functions are initialized within a forEach, instead of count
     

  • Fixed: Transmitting while reloading played radio animation & deleted magazine

  • Fixed: Pressing any key while transmitting would re-squelch radio

  • Fixed: 'r_p' variable wasn't properly reset after respawning

  • Fixed: Script errors & persistent static related to 's_in.sqf'

  • Fixed: Script error related to non-existent Spectator channel on init

  • Fixed: Spectator Channel wouldn't properly reset after respawning

  • Fixed: Direct Channel wouldn't properly reset after respawning

  • Fixed: Air Channel wouldn't properly reset after respawning

  • Fixed: Vehicle channel didn't have a squelch "in" sound

  • Fixed: Vehicle channel is no longer disabled by default in 'CFG.sqf'

  • Fixed: Wrong custom channel variables referenced

  • Fixed: Missing fragmented bracket in 'anim.sqf'

  • Fixed: Typo in 'g_in.sqf'

     

  • Optimized: Replaced keyDown/keyUp eventHandlers with 2 to handle all channels

  • Optimized: disableSerialization command added to 'opt.sqf'

  • Optimized: Removed some unneeded semicolons in short code blocks

  • Optimized: Air Channel references in 'prevCH.sqf' and 'nextCH.sqf'

  • Optimized: Removed unnecessary '_useState' variable/check in code init

  • Optimized: Removed redundant locality declaration for function global variables

  • Optimized: Incorporated more of the 'r_p' player variable throughout the scripts

  • Optimized: Air Channel only checks if pushToTalk keybind is being pressed

  • Optimized: _ch6, _ch7, _ch8 referenced in 'nextCH.sqf' switch structure

  • Optimized: Removed currentChannel check from each radio in/out function

  • Optimized: Removed redundant disableSerialization command from '3DLR.sqf'

  • Optimized: Removed redundant waitUntil code in called functions

     

  • Replaced: inputAction command with actionKeys

  • Removed: KeyDown/KeyUp eventHandlers for each individual channel

  • Removed: Support for the "PushToTalkSide" keybinding

  • Removed: 0 and 1 from 'r_CH' in 'CFG.sqf'

  • Removed: Unused 'r_s' variable

  • Removed: CfgRemoteExec code from 'description.ext' to avoid confusion


 

(05MAY2019) - v0.9

  • Added: r_RTOs variable to 'CFG.sqf': list of RTO units
  • Added: '3DLR.sqf' script to handle pop-up radio
  • Added: 'opt.sqf' for new options UI
  • Added: Adjustable local script settings in radio UI
  • Added: 2 more radio noise sound effects pulled from Arma 3 to add variety
  • Added: 20 more variations of radio noise for weather/day conditions
  • Added: Global variable 'r_noiz' which stores array of radio noise object(s)
  • Added: 'titles.hpp' for pop-up radio interface
  • Added: 'snd.sqf' to handle rain interference
  • Added: 'opt.sqf' to handle client-side in-game options interface
  • Added: RscTitles reference required in Description.ext
  • Added: Metalman10 [EXP] to credits for helping optimize code initialization

 

  • Updated: AFAR Instructions Manual in map briefing
  • Updated: readMe.txt
  • Changed: Pop-up radio when transmitting is now coded as an interface
  • Changed: Radio noise intensity increases based on overcast - WIP
  • Changed: Radio noise intensity increases based on rain
  • Changed: Radio noise intensity increases based on sunOrMoon
  • Changed: Vehicle channel no longer broadcasts radio noise
  • Changed: Rewrote how radio noise is handled / deleted
  • Changed: Renamed "Support Channel" to "Air Channel"
  • Changed: Players with "RTO" trait have access to "Air" channel
  • Changed: Players in pilot, copilot, or gunner seat get access to "Air" channel
  • Changed: Replaced 'incapacitatedState' command with 'lifeState' command
  • Reverted: Players can no longer become an RTO by having 2+ radios
  • Tweaked: Replaced useless '_x' param in remoteExec with player name
  • Tweaked: Improved compatibility with customized radio channel permissions
  • Tweaked: Improved compatibility with disabled Vehicle channel (r_vCH)
  • Tweaked: Improved readability of titleText pop-up when opening radio UI
  • Tweaked: Capitalized all letters in "GUNNER" string, in 'anim.sqf'

 

  • Fixed: Undefined variable "RTO"
  • Fixed: Passengers of vehicles without the RTO trait would get Support channel
  • Fixed: Player would detect himself when transmitting
  • Fixed: Script errors related to enableChannel using bool value, instead of array
  • Fixed: Non-default channel permissions weren't taken into consideration
  • Fixed: Radio noise can only be deleted by the sender ending transmit
  • Fixed: AFAR no longer interferes with hints from mission/mods
  • Fixed: Channel(s) would vanish if no other players available to receive message
  • Fixed: Persistent static bug, related to talking on radio while incapacitated
  • Fixed: If player spawns without a radio, player would hot-mic

 

  • Optimized: Pop-up radio no longer uses attachTo
  • Optimized: Radio noise no longer uses attachTo
  • Optimized: Removed conditional checks in 'useRadio.sqf'
  • Optimized: Removed distance checks
  • Optimized: Removed alive checks
  • Optimized: Removed array sorting code
  • Optimized: Removed vehicle type check
  • Optimized: Removed damage player check in "Put" and "Take" eventHandlers
  • Optimized: Removed '_rtoSeat' variable
  • Optimized: Removed '_PLR' variable from some eventHandlers
  • Optimized: Renamed '_nearP' to '_p'
  • Optimized: 'V_In' checks for players in your vehicle only
  • Optimized: Removed redundant resetting of local/private variables
  • Optimized: Removed redundant 'r_PS' variable
  • Optimized: Removed redundant player isKindOf r_PS checks
  • Optimized: Removed redundant player condition checks in r_fuzz and r_fuzz2
  • Optimized: Removed redundant "ItemRadio" and RTO trait check in 'out' functions
  • Optimized: Removed duplicate in and out eventHandlers for Support channel
  • Optimized: Vehicle horn check no longer uses BIS_fnc_inString
  • Optimized: Code no longer looks for attachedObjects
  • Optimized: Code checking for RTO seat simplified into light-weight variable
  • Optimized: Improved group leader check in the Command channel functions
  • Optimized: Improved civilian vehicle check in the Support channel functions
  • Optimized: Improved efficiency of generating players array variables
  • Optimized: Improved efficiency of getInMan / getOutMan eventHandlers
  • Optimized: Improved efficiency of all in and out functions
  • Optimized: Replaced spawned/attached radio object with a 3D interface
  • Optimized: Replaced (leader(group(vehicle _x))==_x) with (leader group _x==_x)
  • Optimized: Replaced side player with playerSide
  • Optimized: Replaced if(then);if(then);if(then); to a switch
  • Optimized: Replaced 'r_S' with playerSide - (Test)
  • Optimized: Replaced 'r_PS with playerSide - (Test)
  • Optimized: Replaced == with isEqualTo in some cases
  • Optimized: Replaced select with # in some cases
  • Optimized: Replaced ""code"" with 'code' for strings in eventHandlers
  • Optimized: Replaced player with r_p missionNamespace variable - (Test)
  • Optimized: Renamed '_rtoSeat' to 'seat'
  • Optimized: Renamed 'r_Hush' to 'r_out'
  • Optimized: Renamed 'Hush.sqf' to 'out.sqf'
  • Optimized: Deleted lots of "unneeded" whitespaces
  • Optimized: Filesize reduced from 104 KB to 40 KB

 

  • Removed: Radio range requirement (Until BI adds a local mute command)
  • Removed: Radio range settings from the 'CFG.sqf'
  • Removed: Short range "walkie talkie" model
  • Removed: All "Transmitting..." type hintSilent commands in functions
  • Removed: 'S_In1.sqf' and 'S_Out1.sqf'
  • Removed: 'fuzz3.sqf'
  • Removed: Redundant 'r_WS' global variable
  • Removed: Redundant 'AFAR_Text' class from 'defines.hpp'
  • Removed: Unused controls/styles from the 'defines.hpp'
  • Removed: Check if playersNumber playerSide<2 in all functions
  • Removed: MissionEventHandler which deleted the attached radio noise
  • Removed: Unfinished placeholder Zeus compatibility code


 

(22NOV2017) - v0.8

  • 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

  • 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
     
  • 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
     
  • Optimized: "Fuzz2" function has a few less if()then{ structures in it
  • Optimized: Removed redudnant check if player distance > 0
  • Optimized: Removed redudnant "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
     
  • 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

     

(26OCT2017) - 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


 

(23OCT2017) - v0.7

  • Added: Max short-range radio range setting to the CFG.sqf
  • Added: Max long-range radio range setting to the CFG.sqf
  • 2 more static sounds to SFX.hpp, which are slightly louder
  • Arma Radio's Instructions Manual now shows max effective range
  • New "allOff" function to disable all radio channels
  • New "r_alert" function, which alerts nearby enemy AI when talking
  • New setting to enable/disable the new AI alert function
  • Player notification to set a Diary keybind, if one is not detected
  • Player notification to set a PushToTalk keybind, if one is not detected
  • 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 wasn't disabled for everyone if less than 2 players were active
  • Fixed: Support Channel would disable all channels if outside of radio range
  • Fixed: Support Channel for other factions were 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 of radio range
  • Fixed: Corrected misspelled 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: Killzone_Kid from credits (Contribution no longer relevant)


 

(08SEP2017) - v0.6

  • 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

 

  • 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:
  1. Squad Leader
  2. Pilot (Copilot not yet supported)
  3. Gunner
  4. Commander

 

  • 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
     
  • 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
     
  • 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



(19JUN2017) - v0.5

  • 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

 

  • 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

 

  • 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

 

  • 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

 

  • 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

     

(09APR2017) - v0.4

  • Added: Automatically detects your in-game "Push To Talk" keybind
  • 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 respawnChanged: 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

 

  • 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
     

  • 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"
     

  • 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

     

(08MAR2017) - v0.3

  • Added: Automatically detects your in-game "Push To Talk" keybind
  • Added: Larrow to credits; suggested inputAction command
     
  • Tweaked: Radio only checks for friendly players (AI not supported)
     
  • 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: Davidoss and R3vo from credits; contributions not used

     

(23DEC2016) - v0.2

  • Added: Contribution credits via comments at bottom of script to Davidoss, R3vo, rob223344, and Killzone_Kid
     
  • 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: 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: Redundant "else" switch structure in init.sqf

     

(22DEC2016) - v0.1

  • Initial release

 

  • Like 34
  • Thanks 7

Share this post


Link to post
Share on other sites

Hey Phronk, congrats on this great little beauty.

This feels really great and helpfull. Easy to implemate and looks fit.

Thanks for sharing it. So merry xmas for you to be.

 

ps.

Description.ext Line 27 you accidently opened the class Params twice.

Just deleted the line and it worked like a charm.

 

Share this post


Link to post
Share on other sites

Awesome! Love the TFAR mod but even better that it gives the effects for the built in radio.

 

Any chance to enable AI's to have this effect when calling out targets or communicating with in game teams in SP or coop games? 

Share this post


Link to post
Share on other sites

Thanks for this!

 

This will probably be invaluable to the Linux/Mac community because neither TFAR nor ACRE work on those platforms (Teamspeak works on linux*, but both Arma 3 mods use Windows specific hacks).

 

* As does Mumble for the record.

  • Like 2

Share this post


Link to post
Share on other sites

Looks awesome, thanks for the work!

 

Two things I noticed in your script:

 

Replace

if(isDedicated)exitWith{};

with

if !(hasInterface)exitWith{};

 

since neither headless client nor server should initialise the script and add some sort of TAG to your global variables just to make certain they don't get overwritten.

 

  • Like 2

Share this post


Link to post
Share on other sites

Thanks guys!

@ValkenIt's an interesting idea to have this somehow effect AI (I can make it so enemies can hear you if they're nearby) but as far as friendly AI go, I haven't thought of an innovative way that makes sense to incorporate it in a SP mission.  If I do, I'll experiment with the idea for sure.

@R3voI like to keep my variables/functions as short as possible to execute faster, but you're right, I definitely should make the names a bit more unique.  I'll get on that.

  • Like 1

Share this post


Link to post
Share on other sites

Not really aiming to discourage you, I think this is cool, but I think you did it backwards. The static is heard when radio is in RX mode, and when it is in TX mode there is nothing, just the sound of your voice. This is basic principle of TX/RX radio operation. For reference: 

 

  • Like 2

Share this post


Link to post
Share on other sites

@killzone_kidYeah, I'm still trying to figure out how to exclude the transmitting client from hearing static, but I'm not sure how to get a caller (if it's even possible) of a remoteExec.  I'm also probably overlooking something and making it more complicated than it really is.

Share this post


Link to post
Share on other sites

Phronk, first of all this is great, good work.

 

30 minutes ago, phronk said:

@killzone_kidYeah, I'm still trying to figure out how to exclude the transmitting client from hearing static, but I'm not sure how to get a caller (if it's even possible) of a remoteExec.  I'm also probably overlooking something and making it more complicated than it really is.

 

Reading the Biki for remoteexecute:

 

the function will be executed only on client with the given owner ID. When 0, the function will be executed on each client including the one where remoteExec was called from. When 2, it will be executed only by server. When negative, it will be executed everywhere except for machines with the given client ID. Use -2 to target everyone except the server.

 

Area is bold should be the solution

I think in your case your remoteExecs should change as so:

[player]remoteExec["Fuzz",0];

would become:

[player]remoteExec["Fuzz",(-1 * (clientOwner))];

  • Like 1

Share this post


Link to post
Share on other sites

@rob223344Wow, didn't even know about the clientOwner command.  I don't see why this wouldn't work, either.  Thanks for the tip!

Share this post


Link to post
Share on other sites

I was thinking as well phronk you could put a If (player == _this select 0) exitWith {}; in the first line of your Fuzz function that would also work because that will come in handy for your todos that exclude other peopl from hearing side, group and vehicle when they aren't in the channel.

because you can use currentChannel to detect whether the transmitter's on side/vehicle/group channel and change the remote exec to use their side, crew (vehicle player) or group instead of 0 or -1*clientowner as the "target" of the remote exec in those specific cases. in that way the script just detects that the player is the param that was sent over the remoteexec and doesn't run the code but allows you to use a group, side or crew (vehicle player) as targets.

 

 

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

great idea! i was waiting for someone to do something to the radio but addon free. great potential in that area.

 

i'll test this over the holidays with some friends and give some feedback.

  • Like 1

Share this post


Link to post
Share on other sites

This is awesome! it would also be more awesome if you can add some hand animation to see radio being picked up. one observation after watching your video is that I can see players abusing this in that they would check to see if there are enemies in the area. While it won't show exact location of players but it would tell them if there are players near by or have left the area if you were looking for someone on the run.

Share this post


Link to post
Share on other sites

@AggrOnlineThe radio only picks up signals from other units on your team within radio range, meaning opponents cannot steal radios and listen in or get a radio signal from enemy radios.  Haven't tested this at all with two different teams of players active though.

I plan on experimenting with animations, but I doubt it'll get far or become a normal thing with this script.  The animation would end up stopping player movement and that'd probably annoy a lot of people.  Even though it's impractical gameplay-wise, it's still fun to mess around with stuff like that to see HOW impractical it might be.

  • Like 2

Share this post


Link to post
Share on other sites
17 minutes ago, phronk said:

@AggrOnlineThe radio only picks up signals from other units on your team within radio range, meaning opponents cannot steal radios and listen in or get a radio signal from enemy radios.  Haven't tested this at all with two different teams of players active though.

I plan on experimenting with animations, but I doubt it'll get far or become a normal thing with this script.  The animation would end up stopping player movement and that'd probably annoy a lot of people.  Even though it's impractical gameplay-wise, it's still fun to mess around with stuff like that to see HOW impractical it might be.

 

Hey Phronk, thanks for taking time to reply. By units on your team, how would this work in mods where all players are technically on the same team, example being epoch or exile you spawn in as a survivor, albeit they have group management system where they share same clan ID but for the most part I believe they will all be independent, it may work if you are referring to group channel only though?

 

Yes the animation part is nice to have but completely understand what you are saying :-)

Share this post


Link to post
Share on other sites

This block in the script automatically detects the player's side, and sets the player's side function:

switch(side player)do{//Auto-determines r_PS variable
case WEST:{r_PS="SoldierWB"};
case EAST:{r_PS="SoldierEB"};
case INDEPENDENT:{r_PS="SoldierGB"};
case RESISTANCE:{r_PS="SoldierGB"};
case CIVILIAN:{r_PS="Civilian"};};



As long as the modded unit inherits, for example, "SoldierWB", it should work.  If you're running a mission with a Virtual Arsenal where everyone gets their own loadouts, you might as well place the units as default NATO units already in ArmA 3, that way the players can still be detected and change out their gear to whatever modded content you want without possible issues arising. I'm pretty sure most -- if not all -- good modded units (CUP, RHS, etc.) inherit them anyway though, so I think you're pretty safe either way.

Share this post


Link to post
Share on other sites

I'll still use TFAR but I have to say, very nice addon. 

Would love to see that being used in King of the Hill or other PvP, Mod Free Missions!

Share this post


Link to post
Share on other sites

I'm pretty sure the way I'm initializing the script is broken on dedicated servers, so now it will be initialized via initPlayerLocal.sqf.  I'd like to use this in the init.sqf:

AFAR=false;publicVariable "AFAR";
if(isServer||isDedicated)then{
if((!isClass(configFile>>"CfgPatches">>"task_force_radio"))&&{(!isClass(configFile>>"CfgPatches">>"acre_main"))&&(paramsArray select 0==1)})then{AFAR=true};


And then this in the initPlayerLocal.sqf:

if((!isClass(configFile>>"CfgPatches">>"task_force_radio"))&&{(!isClass(configFile>>"CfgPatches">>"acre_main"))&&(paramsArray select 0==1)&&(AFAR==true)})then{AFAR=true;publicVariable "AFAR";};


But for some reason the initPlayerLocal.sqf isn't recognizing the publicVariable set in the init,sqf, whether the server/dedicated sets it or any set it.  So the alternative I'm leaning towards now (Until my brain can figure this simple variable setting/getting) is to simply initialize the script client side, which will still check if that client has TFAR/ACRE2 and if the lobby parameter is set, but will not check if the SERVER has TFAR/ACRE2 enabled.

In other words, if you run a mission with this script and load TFAR/ACRE2 and have the radio script enabled in the lobby parameters, players who connect to the mission without TFAR/ACRE2 will initialize the radio script and can cause everyone to hear his radio bleeps/radio noise whenever he presses/holds CAPS LOCK when within radio range... so if any of you had issues with the script, I think it's because it may need to be initialized via initPlayerLocal.sqf

Share this post


Link to post
Share on other sites

i think your issue is that potentially and probably most of the time the init.sqf (on the server) and the initplayerlocal.sqf (exclusively client side) will run at different times. afaik publicvariable is not persistent hence we had the publicvar EHs before we had bis_fnc_mp and remoteExec. 

so while the server would send that info out to all clients that are already connected at that time, the message will be lost for people joining later. <---------(i suck..ignore this)

also you are doing the publicVariable before deciding if AFAR should be true or false, which i think is not your intention. either way.

 

I
I snip snap...more bs
I

 

depending on if you are sure that everyone uses the same mod set up, it could not be needed to share variables at all since (afaik) paramsarray and the config will be present on all sides. so you could do the checks only local. but i'm sure you had your reasons to go for data sharing to ensure it works in all situations.

  • Like 1

Share this post


Link to post
Share on other sites

Awesome.  I'll update the script tomorrow (Most likely in the afternoon) with the fixes.

 

[EDIT]

Tested the above and so far so good.  Couldn't use True or False as variables, so now it's just 0 or 1.  Will update script shortly.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×