Jump to content
Sign in to follow this  
Guest Slacktide

KEY_SELECT_2

Recommended Posts

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

Share this post


Link to post
Share on other sites
Guest bartels

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest Karl R Pettersen

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest Slacktide

>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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...