Bug #4620

Kegetys spectator script camera stays locked when using the menus

Added by solrac42 almost 6 years ago. Updated about 3 years ago.

Status:Expired Start date:09/17/2009
Priority:Normal Due date:
Assignee:ViperMaul % Done:

80%

Category:-
Target version:-

Description

The Kegetys Spectator script for ArmA 2 is mostly working now but the icons for the units do not show up on the map or in the target list.
If you click near where you know there are units, then it will switch to them and spectate as normal.

The 1st person camera mode seems to stay locked and you can't select another camera mode after it, but when you do select 1st person camera mode the markers for that unit or group will then show up on the map, but not in the target list.

Civilian units markers never show up even when using 1st person camera mode, West, East, and Resistance markers show up when selected but all other groups then disappear again, only the currently selected unit or group markers show up when selected.

spectate.sqf (41.6 kB) solrac42, 11/11/2009 17:39

History

Updated by solrac42 almost 6 years ago

I have discovered that the new Kegetys Spectator script 1.03 for ArmA 2 has a new feature that allows the updating of the markers to be enabled/disabled, but strangely is disabled by default.
The "H" key will enable the map markers and the Target list, so there is no bug.

The 1st person camera however does get locked and you can't use any of the other camera modes after selecting it.

Updated by ViperMaul almost 6 years ago

The keys are disabled by default as the Readme explains inside the folder explains.
This is due to the 3ms Interrupt or lag issue with many units introduced by Arma II.

This issues was recently published in a blog here for more info http://rte.jonasscholz.de/blog/2009/09/22/new-to-arma-2-the-3ms-break

The quickest way to work around the issue with minimal changes to the original code was to put the players in control by adding a toggle. And to set it to the highest performance setting which means it is disabled.

In the future, we hope to add the toggle to the menu so the feature is more visible for those unaware of the new feature.

So the "H" key default off is by design.

Updated by ViperMaul almost 6 years ago

  • Subject changed from Kegetys spectator script not fully working to Kegetys spectator script camera stays locked when using the menus
  • Status changed from New to Assigned
  • Assignee set to ViperMaul
The workaround for the camera getting stuck is to
  1. Makes both the menus are closed.
  2. Then using the keyboard shortcut keys press 5, 4, 3, 2, 1
    This many times will break you out of the locked camera mode.

It is recommended for now to use the keyboard shortcuts to change views until this is fixed.

Updated by ViperMaul almost 6 years ago

solrac42 wrote:

Civilian units markers never show up even when using 1st person camera mode, West, East, and Resistance markers show up when selected but all other groups then disappear again, only the currently selected unit or group markers show up when selected.

I do not understand exactly what you mean. Especially when you use the words "when selected".
Please make a separate issue and explain better where your eyes are looking on the screen to see these markers. Perhaps supplement with a screenshot or video.
I am probably confused by your words because when I move into First Person view I am not selecting anything except to switch to different players.

Please make a separate issue on this. Thanks

Updated by solrac42 almost 6 years ago

I refer you to my last update where I stated that there in fact no bug, the spectator script is working fine, I discovered that the new 1.03 version for ArmA 2 has a new feature using the H key which activates the map markers, and fills the target list, so there was no bug after all.

Updated by ViperMaul almost 6 years ago

Apologies, because there were multiple issues in this thread it was confusing. Which is why it is better put one issue per ticket. Thanks. We appreciate your feedback!

Updated by solrac42 almost 6 years ago

Just found that the target list is always empty.

Updated by ViperMaul almost 6 years ago

Hmm... that one was an old bug that was fixed.
Ok I will try to reproduce it and fix it.
Thanks for the feedback.

Updated by solrac42 almost 6 years ago

I used the Kegetys spectator script v1.03 for ArmA 2 from Lokis lost key and found that the target list is never filled, but I do remember it having a list at sometime for ArmA 2, it must have been pre v1.41 of Lokis lost key.

I have found this error in the spectator script as follows:- The "if(!KEGsMissileCamActive) then {" code is not complete, this causes the camera to stick in first person if using the camera menu, as a work around I copied and pasted the code from spectator script v1.02 for ArmA and camera switching worked fine again.

// Check limits
if(KEGs_tgtIdx >= count deathCam) then {KEGs_tgtIdx = (count deathCam)-1;};
if(KEGs_tgtIdx < 0) then {KEGs_tgtIdx = 0};
if(KEGs_cameraIdx < 0) then {KEGs_cameraIdx = 0};
if(KEGs_cameraIdx >= count _cameras) then {KEGs_cameraIdx = (count _cameras)-1;};
// Select camera, get target
if(!KEGsMissileCamActive) then {
// If not in First Person mode rest camera
If (!(KEGs_cameraIdx == 4) && !(VM_CurrentCameraView in ["INTERNAL","GUNNER"]) ) then {
(_cameras select KEGs_cameraIdx) cameraEffect["internal", "BACK"];
// _debugplayer globalchat format ["Resetting Camera on to %1", KEGs_target];
};
KEGs_target = deathCam select KEGs_tgtIdx; // reset camera to the new or current player target
};
lbSetCurSel[_cLBCameras, KEGs_cameraIdx]; // reset camera mode selection in the listbox to the new or current camera mode
if(lbValue[_cLBTargets, (lbCurSel _cLBTargets)] != KEGs_tgtIdx) then { //possible bug in A2 somewhere in this code - ViperMaul
// Find listbox element with matching value
for "_idx" from 0 to (lbSize _cLBTargets) do {
if(lbValue[_cLBTargets, (lbCurSel _cLBTargets)] == KEGs_tgtIdx) then {
lbSetCurSel[_cLBTargets, _idx];
_found = true;
};
};
};

Updated by ViperMaul almost 6 years ago

Excellent work. Please attach your copy of the fixed file.
I am dealing with a death in the family this week.
So if you could attach the fixed file it would help save so much time.
Thank you.

Updated by solrac42 almost 6 years ago

I have made a mod called "ArmA 2 SPR Mod" which stands for "Single Player Respawn", and so I have changed quite a number of pieces of code to make it SP compatible, I have attached it here so that you can extract the piece of code you need to fix the camera menu for your MP spectator script.
As it is, it will not function properly for MP mode.

Find the "//check limits" comment in the code and you will see the piece of code I used from ArmA spectator script v1.02.

My condolences for your loss.

Regards,

Hunter.

Updated by ViperMaul over 5 years ago

  • Status changed from Assigned to In progress

ok time to add your code fix.

That section of the code looks like this now before I start testing.

1 // Select camera, get target 2 if(!KEGsMissileCamActive) then { 3 4 _debugplayer globalChat format ["KEGs_cameraIdx = %1 VM_CurrentCameraView = %2 ", KEGs_cameraIdx, VM_CurrentCameraView]; 5 6 (_cameras select KEGs_cameraIdx) cameraEffect["internal", "BACK"]; 7 KEGs_target = deathCam select KEGs_tgtIdx; // reset camera to the new or current player target 8 9 // If not in First Person mode reset camera 10 // If (!(KEGs_cameraIdx == 4) && !(VM_CurrentCameraView in ["INTERNAL","GUNNER"]) ) then { 11 // (_cameras select KEGs_cameraIdx) cameraEffect["internal", "BACK"]; 12 // _debugplayer globalchat format ["Resetting Camera on to %1", KEGs_target]; 13 // }; 14 };

There was a scenario where the "If not in First Person mode reset camera" is important in Arma2 but I am sure this will resurface in the test if it is still important in patch 1.05

Updated by solrac42 over 5 years ago

I have installed the 1.05.62017 ArmA 2 patch and discovered that the Escape key no longer exits the spectator script, it does exit other dialogs as normal though.

Updated by ViperMaul over 5 years ago

Yes this is fixed in the future release of the spectator script.
I will be looking for a beta tester soon.

Updated by ViperMaul over 5 years ago

  • % Done changed from 0 to 80

Updated by ViperMaul about 3 years ago

  • Status changed from In progress to Expired

Postponed for now.

Also available in: Atom PDF