Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  

Press button once with controller


In my menu, when press on any button it open new menu with buttons. 

I'm using xbox controller



My problem that when i press quit button , it should open Yes/No menu. No, get me back to first menu. Yes, exit from the game. but it can't show up because when i press on quit button, it press on the No button ! 

Is there any other option except GetButtonUp or GetButtonDown



Share this post

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 1

If the yes/no menu is in the same script as the options menu, put the yes/no button check BEFORE the button check to quit. What's happening, in theory (suggesting it IS in one script), is that when you open the yes/no menu using a button, it will still be on the same frame for a button down check and will automatically select the first answer. By putting the yes/no button check before the quit button check, it will wait til the following frame to check for a down button (which the button is no longer in the down keys list because it's a new frame)

  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...