vipermaul 246 Posted July 23, 2007 (edited) Below is the fix for the beloved Spectating Script v1.01 for Arma. I spoke with Kegetys and he knows what needs to happen. When he finds time he told me he make a new release. The Problem: Ever since v1.08 (actually since 1.07b) mouse clicks on the Menus, Lisboxes and the mini-maps didn't working as previously in 1.05. When I got stuck and just about to give up I ask one of the OFPEC Staff members for help. In less than 30 minutes he had the bug isolated. Mandoble, you must be one of the elite scriptors around. So thanks Mandoble, and everyone else that helped these 8 day project. I have sent the fix to Kegetys so he can release a new one. But he said he pretty much knew already what had to be done. BIS definitely changed something. Apparently the v1.x of the Spectating Script was working because of a the pervious Arma versions before 1.08 had a big bug. Which when BIS fixed it then it broke the script and apparently others like Troopmon I am now hearing. The spectating script uses a dummy element for retrieving mouse events and it was overlapping the entire screen which before worked but apparently shouldn't have. After the fix it got in the way of the other controls. So here is the recommend fix until Kegetys can approve an script upgrade. Mandodable's findings isolated the code and gave a fix for the camera view. I later discovered there was still problems with the Full Map View. Then I remembered what Igor Drukov said to me, "The order of the controls listed in the controls [] {} command is significant and important. So I moved the mouseHandler to the top of the list instead of the bottom. Because researching what Igor said proved that what ever was on the bottom of the list has all the priority. It was like the Z-Order. Or like in PhotoShop when you layer pictures on top of each other you need to tell the program which should lay on top when its shown. This led me to what seems to be the final fix The Solution: Here is what you do.. 1. Open the spectating.hpp 2. Move the entire class definition for mouseHandler: KEGsRscControlsGroup (Line 238-248 in my version) to just below of the class controls { line. (just below line 45 in my version) The code that needs to move is shown as follows... // Dummy element for retrieving mouse events class mouseHandler: KEGsRscControlsGroup { onMouseMoving = "[""MouseMoving"",_this] call spectate_events"; onMouseButtonDown = "[""MouseButtonDown"",_this] call spectate_events"; onMouseButtonUp = "[""MouseButtonUp"",_this] call spectate_events"; onMouseZChanged = "[""MouseZChanged"",_this] call spectate_events" idc = 123; x = 0.0; y = 0.0; w = 1.0; h = 1.0; colorBackground[] = {0.2, 0.0, 0.0, 0.0}; }; Now the mouseHandler class, as a result of being the first control defined in the list has the lowest priority for receiving mouse events within the overlapped area of the screen. In other words, if there is another controls shown on top of this area, it will no longer steal the mouse events and thus you have a working spectating script again. I cannot cannot find any problems with the change so far and thus would need your feedback. Again Super Thanks goes to Mandoble, OFPEC Editor's Depot Admin Staff Edited April 14, 2009 by ViperMaul Share this post Link to post Share on other sites
ck-claw 1 Posted July 23, 2007 Thanks for the heads up! Will try when get chance! Share this post Link to post Share on other sites
vipermaul 246 Posted July 23, 2007 You're welcome. Many of you should know Mandoble, he is may be mostly known for his upcoming MMA v2.2 (Mando Missile ArmA scripts). Which by the way has one of the coolest dialogs boxes in the game, the MCC dialog box used for launching missiles. Igor Drukov, may be known for his tutorial on Event Handlers he published over on OFPEC Tutorials Section. By the way I am a just a young associate member of the MOD Team lead by BarmyArmy over at Arma Interactive (http://www.arma-tow.com/ ) which is growing week by week. We are doing some cool stuff over there and we are all getting better each month. Share this post Link to post Share on other sites
Wildgoose 1 Posted July 24, 2007 nice find, will be updating SES Server missions with the fix. Thanks Share this post Link to post Share on other sites
sickboy 13 Posted July 24, 2007 Thanks Maul & OFPEC Staff! Share this post Link to post Share on other sites
norrin 9 Posted July 24, 2007 I've just incorporated your fix into the release of my AI_disabled_revive_scripts. Many thanks to VM and the guys at OPFEC for sorting this out. Share this post Link to post Share on other sites
fer 21 Posted July 24, 2007 Expect to see this fix in the next release of BAS f (coming soon). Great work, ViperMaul! Share this post Link to post Share on other sites
rubberkite 19 Posted March 2, 2008 HI, I've a problem with this script, I can't see the bullet path in 3d, as shown in the youtube video of this addons. there is some Config value to set to be able to see 3d bullet path when in the action ?? thank u Rubber Share this post Link to post Share on other sites
sickboy 13 Posted March 10, 2008 HI,I've a problem with this script, I can't see the bullet path in 3d, as shown in the youtube video of this addons. there is some Config value to set to be able to see 3d bullet path when in the action ?? thank u Rubber Altough we're offtopic Here I believe; Did you add the addon to the proper addon folder? you need the kegetys extra addon for this to work :P Share this post Link to post Share on other sites
rubberkite 19 Posted March 10, 2008 Hi sickboy my friend d I've already put the addon, I solved this issues, looking into spect.sqf of revolution, tha has commented the client detection code. but now I got another problem... DAMN!!!! if I use the client addon, and the 3d bullet path, the unit tag is not already displayed... I whould got both working togheter so I can do some fraps movie of mi mission, with enemy troups movement as light's in the night. there is a way I know to allow both working, the tag over the unit, and the "client addon" features. help me Share this post Link to post Share on other sites
sickboy 13 Posted March 11, 2008 Hi sickboy my friend d I've already put the addon, I solved this issues, looking into spect.sqf of revolution, tha has commented the client detection code. but now I got another problem... DAMN!!!! if I use the client addon, and the 3d bullet path, the unit tag is not already displayed... I whould got both working togheter so I can do some fraps movie of mi mission, with enemy troups movement as light's in the night. there is a way I know to allow both working, the tag over the unit, and the "client addon" features. help me HeY I think you should simply remove the whole current Spectator and include the default version. Trying to fix bugs or find disabled effects in non-default scripts is IMHO a waste of time ;-) (What other broken feature will you find next time?) Share this post Link to post Share on other sites
rubberkite 19 Posted March 12, 2008 some times the easy way is the simplest one, I don't understand why killjoy, removes the client addon detection for spectating... I keep original setting backup, and now change to the "default" for spectating, and test the enviroment. thank you for "illumination" hehheehe Share this post Link to post Share on other sites
mr.g-c 6 Posted August 25, 2008 Is this working with 1.14 aswell? Regards, Christian Share this post Link to post Share on other sites
vipermaul 246 Posted April 14, 2009 Thanks Matt for getting this uploaded to Armaholic.com - http://www.armaholic.com/page.php?id=422 Share this post Link to post Share on other sites