[Help] How to have an input command respond only once

i have completed section 2 of the course, but before moving on to what is next i wanted to add a confirmation script to basically tell the program to start guessing my chosen number. So the confirmation script is to just help the player take their time and think of a number, then press a button to let the program know that they have chosen one and are ready.
Here is the script:

My question is (well i wrote it in the title but here goes): How do i disable the space command after the player presses it for the first time?

Thank you

Hello :slight_smile: I started coding a week ago and i thought your idea might be interesting to do and i tried to do. it took me some time create but here is what ive accomplished so far. https://pastebin.com/KhDTzRjm It works pretty neat. I even add another button for player to press to restart the game. If anyone pro coder here can tell me how could this be done in a more professional way? How could (one time input get) be done? And is this code so trash by its logic? Thanks in advance

Hello ehturan,
As you can tell, i had the same question, what i did was move on in the course, and after a little bit i found the answer.
So i think the best thing for you to do is to keep moving in the course. They will talk again about the number wizard game, and you will use most of the code you have written here again.

All the best

1 Like

Hi,
That’s what i am going to do right now :slight_smile: Their videos pretty easy to follow and clean. But I’m also happy that i was able to write something in my own xD I also posted a post where i showed my code and how to improve it. I mentioned your name there that I took the idea from you.

All the best

1 Like

Privacy & Terms