Page MenuHomeFeedback Tracker

CurrentChannel broken on "NextChannel" keydown event
New, NormalPublic

Description

My current channel is actually 7, yet when recording the keydown event for "NextChannel" the channel should progress in the order; 5, 7, 12, 13.
My keydown event has diag_log lines in it to record what Arma thinks is the current Channel when pressing NextChannel...

10:18:33 "KeyHandler || Troubleshooting channels | Next Channel | Current Channel: 5"
10:18:33 "KeyHandler || Troubleshooting channels | Next Channel | Current Channel: 5"
10:18:33 "KeyHandler || Troubleshooting channels | Next Channel | Current Channel: 5"
10:18:34 "KeyHandler || Troubleshooting channels | Next Channel | Current Channel: 5"

Because it sees the current Channel as 5, it continually progresses to channel 7, despite being on channel 7 already, so the NextChannel function simply does not work anymore since the Apex update.

Previous channel works correctly, although when operating on Channel 5 (Direct), it displays Channel 3 (Group) in the output logs below:
9:58:17 "KeyHandler || Troubleshooting channels | PrevChannel | Current Channel: 7"
9:58:17 "KeyHandler || Troubleshooting channels | PrevChannel | Current Channel: 3"
10:04:00 "KeyHandler || Troubleshooting channels | PrevChannel | Current Channel: 3"
10:04:00 "KeyHandler || Troubleshooting channels | PrevChannel | Current Channel: 13"
10:04:01 "KeyHandler || Troubleshooting channels | PrevChannel | Current Channel: 12"
10:04:01 "KeyHandler || Troubleshooting channels | PrevChannel | Current Channel: 7"
10:04:02 "KeyHandler || Troubleshooting channels | PrevChannel | Current Channel: 3"
10:04:02 "KeyHandler || Troubleshooting channels | PrevChannel | Current Channel: 13"
10:04:02 "KeyHandler || Troubleshooting channels | PrevChannel | Current Channel: 12"

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

//Channel select Next
if (_code in actionKeys "NextChannel") then {
if (currentChannel == 13) then {

		if (vehicle player != player) then {
			_isSet = setCurrentChannel 4;
		} else {
			_isSet = setCurrentChannel 5;
		};

};
if (currentChannel == 3 && (vehicle player == player)) then {_isSet = setCurrentChannel 4;} else {_isSet = setCurrentChannel 5;};
diag_log format ["KeyHandler || Troubleshooting channels | Next Channel | Current Channel: %1",currentChannel];
};

//Channel select Previous
if (_code in actionKeys "PrevChannel") then {
if (currentChannel == 5 && (vehicle player == player)) then {_isSet = setCurrentChannel 3;};
if (currentChannel == 4) then {_isSet = setCurrentChannel 3;};
diag_log format ["KeyHandler || Troubleshooting channels | PrevChannel | Current Channel: %1",currentChannel];
};

//PushToTalk handler...
if (_code in actionKeys "PushToTalk") then {
switch (currentChannel) do {

		case 3: {_isSet = setCurrentChannel 5;};
		case 4: {};
		case 5: {};
		case 6: {_isSet = setCurrentChannel 5;};
		case 7: {_isSet = setCurrentChannel 5;};
		case 8: {_isSet = setCurrentChannel 5;};
		case 9: {_isSet = setCurrentChannel 5;};
		case 10: {_isSet = setCurrentChannel 5;};
		case 11: {_isSet = setCurrentChannel 5;};
		case 12: {};
		case 13: {_isSet = setCurrentChannel 5;};

};
};

Additional Information

The above code is what is placed inside a keyhandler.

Channel 3 (Group) is disabled, so should not be accessed, ever. Channel 4 (Vehicle) is hidden until a player is in a vehicle.
The last portion of code is the only other part where setCurrentChannel is used, and this is simply to change the chat channel of a player who presses their pushToTalk key to prevent side-chat spam.

Event Timeline

3LGStevo created this task.Sep 1 2016, 11:30 AM