t2:push_to_talk

push_to_talk


push_to_talk - Enable or disable the headset MIC

Description


void push_to_talk(bool talk);

Enable or disable the controller headset MIC according the talk argument.

Parameters


  • talk: TRUE for enable the headset MIC or FALSE to disable.

Return Value


No value is returned.

Examples


Example #1 push_to_talk() example

init {
    // Disable the headset MIC when the script is loaded
    push_to_talk(FALSE);
}
 
main {
    if(event_active(BUTTON_2)) {
        // Enable the headset MIC when the button is pressed
        push_to_talk(TRUE);
    } else if(event_release(BUTTON_2)) {
        // Disable the headset MIC when the button is released
        push_to_talk(FALSE);
    }
}
t2/push_to_talk.txt · Last modified: 2019/11/19 20:39 by J2Kbr