March 30, 200521 yr Moderator Has anyone gotten the key_event KEY_SELECT_2, etc. to work?I'm trying to open both cockpit doors using the following, and it doesn't seem to be working. The pilot's door will open, then close again, rather than the copilot's door opening... ;(if (acft_on_grnd == 1 && chutetimer > 0 ){chutedown = 1 ;chutedeploy = 0 ;trigger_key_event (KEY_BRAKES,0) ;trigger_key_event (KEY_TOGGLE_AIRCRAFT_EXIT,0) ;trigger_key_event (KEY_SELECT_2,0);trigger_key_event (KEY_TOGGLE_AIRCRAFT_EXIT,0) ;} Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
March 30, 200521 yr I tried to peek on the events fired by FS when hitting the "toggle exit 1"/"toggle exit 2" sequences (SHIFT+E/SHIFT+E 2). The registered key sequence is really strange://exit 1:KEY_TOGGLE_AIRCRAFT_EXITKEY_ATC_MENU_CLOSEKEY_ATC_MENU_CLOSE//exit 2:KEY_TOGGLE_AIRCRAFT_EXITKEY_ATC_MENU_CLOSEKEY_ATC_MENU_CLOSEKEY_SELECT_2KEY_ATC_MENU_CLOSEI don't know why there are these atc keys. Maybe just some fillins?Arne Bartels
March 30, 200521 yr If the ATC menu is open, it will capture the Key_Select_2 command. In order for the Key_Select_2 to be useful, the ATC window must therefore be closed. I think that's why FS generates the ATC_Menu_Close command automatically.Doug
March 30, 200521 yr Moderator Hmmm... perhaps some timing issues prompt that strangeness. In any event, it still doesn't work... ;( if (acft_on_grnd == 1 && chutetimer > 0 ) { chutedown = 1 ; chutedeploy = 0 ; trigger_key_event (KEY_BRAKES,0) ; trigger_key_event (KEY_TOGGLE_AIRCRAFT_EXIT,0) ; trigger_key_event (KEY_ATC_MENU_CLOSE,0) ; trigger_key_event (KEY_ATC_MENU_CLOSE,0) ; trigger_key_event (KEY_TOGGLE_AIRCRAFT_EXIT,0) ; trigger_key_event (KEY_ATC_MENU_CLOSE,0) ; trigger_key_event (KEY_ATC_MENU_CLOSE,0) ; trigger_key_event (KEY_SELECT_2,0) ; trigger_key_event (KEY_ATC_MENU_CLOSE,0) ; }From what the SDK indicates (which is as likely wrong as not!), is to issue the KEY_SELECT_2 prior to sending the KEY_TOGGLE_AIRCRAFT_EXIT command... ??? Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
March 30, 200521 yr Bill,I was also thinking it might be a timing issue. Can you set the gauge up to delay opening the second exit by one gauge update cycle? Who knows, it might help...Doug
April 2, 200521 yr Is this a C problem only, or should I expect problems in XML as well? Or could it be a problem only regarding Exits but not Engine selects? I've never tried anything with many exits, but my XML variant for selecting engines works find with the default 747 I tried it on.
April 2, 200521 yr Moderator Karl, I honestly don't know since I quit fooling around with XML a long time ago (as far as gauges are concerned that is)...For my immediate purposes (which is to have both doors auto-open after the Cirrus SR20G2 is back on the ground after successful parachute deployment) I will simply create another animation node that's tied to the main exit (door #1) and will auto-open at the same time under those particular circumstances... ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
April 3, 200521 yr >Is this a C problem only, or should I expect problems in XML>as well? Or could it be a problem only regarding Exits but not>Engine selects? I've never tried anything with many exits, but>my XML variant for selecting engines works find with the>default 747 I tried it on.The following works fine for me in XML:(>K:TOGGLE_AIRCRAFT_EXIT) (>K:SELECT_2)Of course, you have to make sure that there are no other gauges that are triggering K events during every update cycle.Dan
Create an account or sign in to comment