Advertisement
sonixapache

TFR Half-Duplex

Jan 18th, 2015
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.36 KB | None | 0 0
  1. // Makes TFR work like ACRE, mutes your radio while you're talking. Promotes good radio discipline!
  2. // Pseudocode. Probably doesn't work the way it should. A real coder should look at this.
  3. // https://github.com/michail-nikolaev/task-force-arma-3-radio/wiki/API:-Functions
  4.  
  5. /*
  6. Okay so we looked into some shit and the original script doesn't work right - it would mute your radio while talking in direct.
  7. We found the
  8. fn_onRADIOTangentPressed.sqf and
  9. fn_onRADIOTangentReleased.sqf scripts - the functions that handle when a radio button is pressed and released.
  10. https://github.com/michail-nikolaev/task-force-arma-3-radio/tree/master/arma3/%40task_force_radio/addons/task_force_radio/functions
  11.  
  12. Those features would let us easily work out when to run the volume lowering and raising.
  13. You could use the setvolume function to set the volume within those pressed/released functions.
  14.  
  15. Problems are:
  16.  - Carrying over the volume that was set before transmitting (Global variables? Player variables?)
  17.  - ?
  18.  
  19. */
  20.  
  21.  
  22. //if (player call TFAR_fnc_isSpeaking) then {
  23. //_volume = (call TFAR_fnc_ActiveSwRadio) call TFAR_fnc_getSwVolume;
  24. //[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, 0] call TFAR_fnc_setLrVolume;
  25. //}; else
  26. //[(call TFAR_fnc_activeLrRadio) select 0, (call TFAR_fnc_activeLrRadio) select 1, (_volume)] call TFAR_fnc_setLrVolume;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement