How do I make it so that there is a developer mode?
I was wondering if there was a way in Python to make it so if I pressed a button it would allow you to type in which section you wanted to go to in my game. For instance, if I had a section called BossFight(), I would want to be able to press 7 on my keyboard and it would say "Where would you want to go?" and I would type that section and it would play that section. Bit of a long shot but wondering if I could make it happen
Well you could ask them which section, they type something, and based on what they type, call the function
go = input("Where would you want to go?") # input to ask user if go == "7": # conditionals to determine what user wants to do BossFight() # calls BossFight function
Is this what you wanted? :)
you could do a multithreading and have the other thread running getch and watching for 7 being pressed then interrupting the main program and then doing something like this:
goto = input("Where would you like to go: ") if (goto == #whatever you want): BossFight() #this next bit is if you want more then one thing elif (goto == #whatever you want): #anything else you want