Computer Science Canada Looping game back to main menu |
Author: | IamPillzbury [ Sat Apr 18, 2015 2:56 pm ] | ||
Post subject: | Looping game back to main menu | ||
What is it you are trying to achieve? I'm making an interactive story for school What is the problem you are having? If the player chooses instructions, he/she will read through the information and will have to close the window and run it again to play the game. I want it so that once the instructions are done, the player can press a certain key and it will loop it back to the main menu Describe what you have tried to solve this problem I've tried to make a loop for the area dedicated for instructions but it doesn't really work Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using 4.1.1 P.S: First post on this site. no hate pls |
Author: | Insectoid [ Sat Apr 18, 2015 3:40 pm ] |
Post subject: | RE:Looping game back to main menu |
You should put the instructions into their own procedure. Inside your main menu, if the player clicks 'instructions', then call the instructions procedure. When the player exits the instructions, simply exit the main loop in your instructions procedure and the procedure will end, which will cause your main menu loop to automatically resume. |
Author: | IamPillzbury [ Sat Apr 18, 2015 4:48 pm ] |
Post subject: | Re: RE:Looping game back to main menu |
Insectoid @ Sat Apr 18, 2015 3:40 pm wrote: You should put the instructions into their own procedure. Inside your main menu, if the player clicks 'instructions', then call the instructions procedure. When the player exits the instructions, simply exit the main loop in your instructions procedure and the procedure will end, which will cause your main menu loop to automatically resume.
How would I do that if I may ask? My teacher has only taught us basics, looping and if statements |
Author: | Insectoid [ Sat Apr 18, 2015 11:40 pm ] |
Post subject: | RE:Looping game back to main menu |
There are plenty of tutorials covering procedures on this site. Have a look at The Turing Walkthrough or try the search button at the top of the page. |