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 weather conditions during transmissions.  No mods or third-party programs required.  Setup is easy!

 

I created a Feature Request ticket for BI to add a mutePlayer command. Please up vote!

 

 

VIDEO:

 

SCREENSHOTS:

Spoiler

SCdWuij.jpg
4g1xSc0.jpg

 

 

FEATURES:

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

  • No custom sounds; AFAR recycles Arma 3's audio files

  • No custom artwork; AFAR recycles Arma 3's models/textures

  • No custom animations; AFAR uses an animation already Arma 3

  • No custom items; Players just need a radio equipped to talk on radio channels

  • Adds interesting depth to VOIP, which it has lacked for so long
  • Talking on VOIP channels in-game will broadcast radio noise to all friendlies with a radio
  • Radio noise gets louder based on overcast, rain, and sunOrMoon
  • Incapacitated / dead players cannot use radio
  • In-game radio interface includes options to customize settings locally
  • 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
  • More information in the "ReadMe.txt"

 

 

TO DO LIST:

  • Fix all known bugs
  • Include Zeus compatibility (Low priority)
  • Simplify script installation
  • Add new (Optional) radio animations
  • Rewrite interface code into .SQF instead of .HPP
  • Singleplayer compatibility
  • Extend AI communications with you
  • Terrain interference
  • Expand radio interference effects
  • Kick player from group if no radio? (Optional)
  • Reintroduce distance factors (Once BI adds necessary command(s) to Arma)
  • Release a separate standalone mod version
  • Create official AFAR gitHub repository

 

 

KNOWN BUGS: (Upcoming Change-Log)

  • Mouse button inputs (LMB, MMB, RMB) are not supported

  • Not Zeus compatible

  • Major issues occur if player's original group is deleted (Dynamic Groups)

 

 

CREDITS:

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

    CONTRIBUTIONS:

          • DirtySanchez: Helped organize functions/define CfgRemoteExec

          • Metalman [EXP]: Helped optimize code initialization

 

    TESTERS:

          • BadBenson

          • BruceAlmightyy

          • KingCarter

          • Limey

          • MorpheousMike

          • PRYMSUSPEC

          • Sjakal

          • statsback2zero

 

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:

execVM "AFAR\init.sqf";

 


      3. Copy and paste the following code into your mission's "Description.ext" file:
 

    class RscTitles {
#include "AFAR\UI\titles.hpp"

titles[]={};
    };

 

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

sounds[]={};
    };

 

 

      4. OPTIONAL: May be necessary if using addons which restrict usage of remoteExec, such as Exile

 

class CfgRemoteExec {
 class Functions {
 mode=1;jip=0;
 class Fuzz {allowedTargets=0;};
 class Fuzz2 {allowedTargets=0;};
 class r_out {allowedTargets=0;};
 class r_alert {allowedTargets=0;};
 class r_anm {allowedTargets=0;};
};
 class Commands {
 mode=1;jip=0;
 class playSound {allowedTargets=0;};
 class say2D {allowedTargets=0;};
 class reveal {allowedTargets=0;};
 };
};


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

 

 

(03JUN2019) - v0.91
Download Link (Google Drive)

Download Link (Steam Workshop)

Download Link (Armaholic - OUTDATED)

 

CHANGE-LOGS:

 

(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 26
  • Thanks 2

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 1

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 1

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

×