Jump to content

Recommended Posts

Thanks, fixed.

I'm pretty sure I've fixed the bug where the radio would stop working when the r_up_ and r_dn_ global variables get stuck in the wrong true/false sequence. This would more commonly happen if switching channels while talking or dying while talking (as some examples), because the "dn.sqf" and "up.sqf" functions specifically check if the variable returns whether the player is talking or not. The fix was to incorporate another global variable that also stores the original channel you started talking in and the state. I haven't put in the time to code this into all aspects of AFAR but I'm pretty sure it'll largely, if not completely, fix the problem. We'll see. I'll try to release a test version sometime once it's a little more cleaned up.

I appreciate the bug reports, too!

  • Thanks 2

Share this post


Link to post
Share on other sites

I just want to say this is the most useful script we use in our grp. Thank you for updating this thing! 👍

  • Like 2

Share this post


Link to post
Share on other sites

Download Link (Google Drive)

Version: 0.99b [OEF TEST VERISON]
Size: 120 KB

(No change-log for now, since it is still being updated, but refer to this link for a full list of changes from the prior full release)

Yet another test version of AFAR; most notable change from the previous test release is a variable which stores the player's original channel they started talking in and talking state (True or false) which should at least partially fix the issue of the radio functions not working due to variable status discrepancy (Variable which stores what your talking channel and state is, talking or not talking, would get stuck in false or true due to another channel resetting it before the squelch out function is called). I say partially fix the issue because this version doesn't fully employ the fix, it's more of a test to see if it improves the results. If so, I can move forward with finishing it up. Not difficult to fix at this point, just tedious.

Didn't even know people actually used AFAR, that's pretty cool to hear. I'm surprised people are actually deciphering my intentionally ugly code and cryptic variables, you guys are nuts lol. I appreciate the bug reports, they've been helpful. Test this if you'd like and report any bugs you find, screenshots or videos are also very helpful. Must be tested with at least 1 other player or more. (The more the better)

Thanks & enjoy!

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Hello, Phronk!
I don´t know whether you´re still rocking upon such work of yours, but I wonder if it would be possible to have an additional "Group-like" radio channel, but a somehow subscribe-able one, like the extra channels inside Quiksilver´s Invade&Annex framework ...?
So that the server could have the main channel voice shut, making audio available only for the players which decide to activate such new radio.

Cheers!
 

Share this post


Link to post
Share on other sites

I'm less active with Arma 3 nowadays, but I do still work on my missions and scripts here and there. The scope of AFAR is to enhance the vanilla radio channels, in addition to the 3 custom channels (1 for each faction), so I do not plan on coding any other features. "The plan" (if you want to call it that) is to fix as many bugs as possible, release a stable script version, and then release a stable addon version.

 

If anyone has played with others using the version posted 2 posts prior, let me know if you encounter any bugs or not. If you do encounter issues, let me know what occurred and how (if you can).

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Hi phronk,

Thank you for keep updating this wonderful script. v0.99b works well on our server and missions.

 

Based on our actual usage, I would like to ask if it is possible to modify the radio range of the channel by myself?

I noticed there are two sqf files contain distance parameters: d.sqf and vol.sqf

If I want to increase side and group radio range to 11000 and 4500, is it possible to modify all 9600 and 3200 in d.sqf directly  to increase the range? Also I will modify the arrays in vol.sqf appropriately.

 

Besides these two files, are there any other changes needed ?

 

 

Share this post


Link to post
Share on other sites

@fubukiiwanami Thanks for the feedback; Feel free to make whatever tweaks you want to make it more usable. The "d.sqf" script handles the distance checks when players use VOIP. (_this#0) = either 1 or 2. 1 is for group channel, 2 is for channels like side, command, and the custom "RTO" channel if I remember correctly. Maybe for the next version I can add parameters to adjust the radio ranges via the "CFG.sqf", thought I had already done it. Also, I believe the radio backpack is needed to increase your radio range -- stronger radio = longer range. (Refer to the scripts such as "S_in.sqf")

@kibaBG Not yet, but that's a good idea, I'll add it to the next update since I own it anyway.

  • Like 4

Share this post


Link to post
Share on other sites

Download Link (Google Drive)

Download Link (Steam Workshop)

Version: 0.99

Size: 132 KB

 

 

ADDITIONS:

Added: Global Mobilization DLC support for radio backpacks

Added: Mouse-buttons can now be used for PushToTalk keys

• Added: Players can now cycle to Direct channel via keybinds/radio UI

• Added: Respawning/exiting vehicles cache prior selected channel

• Added: "r_ptt" global variable in "dn.sqf" and "up.sqf"

• Added: _ch variable in "up.sqf" uses channel stored in r_ptt

 

ADJUSTMENTS:

• Changed: Radio interface is opened by double-clicking your equipped radio

• Changed: Radio "in" functions call "r_out2" for better radio state handling

• Tweaked: Increased volume of all AFAR sounds

• Tweaked: Explanation on how to view the radio interface in the briefing

 

FIXES:
Possibly Fixed: "out" related functions breaking

Possibly Fixed: RPT errors related to "dialogs.hpp" and "defines.hpp" files

• Fixed: Displays other than 46 & 312 will pause AFAR eventHandlers until it exits

• Fixed: Converted "r_f" global variable to an object variable, so deleteAt works

• Fixed: Unnecessary quotation within string in "vOut.sqf"

• Fixed: Missing semi-colons in "dialogs.hpp"

• Fixed: Possible memory leaks related to non-private local variables

• Fixed: Some functions may propagate local variables due to no arguments defined

• Fixed: _p switch case return was out of scope in "out2.sqf"

 

OPTIMIZATIONS:

• Optimized: Much less "KeyDown" displayEventHandlers

• Optimized: EventHandlers are no longer being deleted/recreated

• Optimized: Channel cycling code has less code chunks per channel

• Optimized: Replaced apply with forEach in "out.sqf"

• Optimized: _p variable is now the return of switch case in "out2.sqf"

 

REMOVALS:

• Replaced: DisplayAddEventHandler code with BIS_fnc_addStackedEventHandler

• Removed: "Diary" keybind no longer opens radio UI

• Removed: "eh.sqf" script

• Removed: "Z.sqf" script

 

KNOWN BUGS:

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

__________________________________________________________________________

 

Rewrote code to use StackedEventHandlers using "OnEachFrame", instead of DisplayEventHandlers, which fixed a few bugs directly & indirectly. This also adds mouse-button support!

 


Thanks & enjoy!

 

PS: Happy Independence Day! 🗽

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks for the suggestion, it works on my server.

 

On 7/1/2023 at 9:39 PM, phronk said:

 Maybe for the next version I can add parameters to adjust the radio ranges via the "CFG.sqf", thought I had already done it. 

 

It would be nice if it could be adjusted in CFG.sqf ! This is an easy way to set up a more flexible radio scheme.

 

PS: Glad to see a new update so soon ~

Share this post


Link to post
Share on other sites

@fubukiiwanami I'll put it on my to-do-list for the next version, which may end up being a hotfix version (such as v0.99b) before the long awaited and highly requested addon version, since I suspect there are still bugs that need to be fixed but require additional multiplayer testing.

Share this post


Link to post
Share on other sites

@phronk I cannot make work the latest version ... 2xJ does not show the radio. Its like the script starts normally (AFAR Initialized) but the radio is not recognized, because I can speak directly only. Global Mobilization DLC, no other mods. BIS_fnc_addRespawnInventory is used to equip the loadout and the radio respectively. 

Share this post


Link to post
Share on other sites

I had removed the J x2 keybind due to people complaining it conflicted with the Diary keybind's (Apparently people use it) functionality, so the two ways to access your radio interface is either by switching to another radio channel (If "r_chOn" is false) or by double-clicking your equipped radio in your inventory.

Share this post


Link to post
Share on other sites

@phronk I tried both ways, still no luck. Its working fine with vanilla A3 in an empty mission only with player spawned with radio equipped. Then I tried the same thing with Global Mobilization and its not working so its the DLC's fault 100%. Interesting what is wrong, its the same radio and all. 😪 

Share this post


Link to post
Share on other sites

Just for information, it's nice to no longer having the 2xJ command, because it's the same binding we have for quick view of mission objectives in QS's Invade&Annex framework.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
15 hours ago, kibaBG said:

@phronk I tried both ways, still no luck. Its working fine with vanilla A3 in an empty mission only with player spawned with radio equipped. Then I tried the same thing with Global Mobilization and its not working so its the DLC's fault 100%. Interesting what is wrong, its the same radio and all. 😪 

@kibaBG If you are running a DLC like GM or SOG, it may be due to the "ItemRadio" being removed from the "r_RTOBP" or "r_radios" global variables. If you equip the DLC radio, it should work in that case. Weird oversight, I should probably just add the DLC radios in addition to the vanilla ones, instead of either or. Thanks for reporting.

  • Like 2

Share this post


Link to post
Share on other sites

As long as CfgRemoteExec is not defined anywhere in the mission, it will work.

  • Like 1

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

×