Computer Science Canada Buttons .... Procedures....more problems |
Author: | goleafsgo123 [ Sun May 29, 2005 6:33 pm ] | ||||
Post subject: | Buttons .... Procedures....more problems | ||||
So I'm creating a "Choose-Your-Own Adventure" style game, and I want to make up scenarios, and then the user chooses their answer. I want to incorporate buttons into the game, for each selection, and I am following this Buttons Tutorial:
Now, I incorporated that into my program, but something does not seem to work. It says that I have not declared "Question 1A". Here is the code of my program ....
Any help is appreciated... |
Author: | Delos [ Sun May 29, 2005 10:13 pm ] | ||
Post subject: | |||
Turing GUI is horrid like that. You can create your button streams at the onset of your programme, but you'll have to wait until after their associated fucntions are done to initialize them. So...
In that order. |
Author: | goleafsgo123 [ Mon May 30, 2005 5:24 am ] | ||
Post subject: | |||
Thanks for that Delos, but now I got another problem I got the buttons to show up when I wanted to, but there is NO way for the user to click on the buttons in the output. The GUI does not seem to allow the user to click on it Here's my updated code, and again, all help is greatly appreciated...
|
Author: | MysticVegeta [ Mon May 30, 2005 7:31 am ] | ||
Post subject: | |||
you have to add
in the end. But you have to figure out where you need to put. Cant put it for you now cause i am in the library. |
Author: | goleafsgo123 [ Mon May 30, 2005 11:45 am ] |
Post subject: | |
Yeah, I know about those loops, but whenever I put them in the program, the program either refuses to load, or crashes after the run screen, depending on where I put them. So is there any other place where I can put that loop ... ? |
Author: | MysticVegeta [ Mon May 30, 2005 3:36 pm ] | ||
Post subject: | |||
There you go. |
Author: | MysticVegeta [ Mon May 30, 2005 3:37 pm ] |
Post subject: | |
You have to position the declaration of the buttons properly (which i did) Also the "offscreenonly" was interfering with the GUI. You shoul have "nooffscreenonly" in every procedure you show/enable a GUI button or other interface. |
Author: | goleafsgo123 [ Thu Jun 02, 2005 7:26 pm ] | ||
Post subject: | |||
Darn, I seem to have run into a roadblock with the program. So I got the button to go to the next screen to work, but once it goes to the next screen ..... you can't click on the buttons. I can't seem to recognize the problem, seeing as the code is exactly the same for both button screens, yet there is a problem. Any help is appreciated!
|
Author: | goleafsgo123 [ Fri Jun 03, 2005 5:24 pm ] |
Post subject: | |
Anyone? |
Author: | MysticVegeta [ Fri Jun 03, 2005 7:28 pm ] | ||
Post subject: | |||
You dont need 2 exit when GUI.ProcessEvent, You could simply make more procedures, and then clear the screen on every procedure. and you will have to ->
|
Author: | goleafsgo123 [ Fri Jun 03, 2005 8:28 pm ] |
Post subject: | |
Thanks for all the help, Mystic Vegeta, but I still need one more critical thing ... For my procedure scene1, the user can perfectly click on the buttons, and the appropriate text appears. But, for scene2, even though the code is the same as scene1, I can NOT click the buttons at all... |
Author: | MysticVegeta [ Sat Jun 04, 2005 9:01 am ] |
Post subject: | |
well, did you modify the code according to the post? If you did try to modify and didnt get anywhere, post the modified code, i will try to fix it |
Author: | goleafsgo123 [ Sat Jun 04, 2005 12:11 pm ] | ||
Post subject: | |||
Ok, so I added the GUI.Disable, and GUI.Hide code for each previous button. I was a little unsure about where to put it, but I decided to put it in the procedure for scene2 Even with that, you still can't click the buttons on scene2, even though you can see them fine. Here's the code:
Again, thanks so much for everything, MysticVegeta! |
Author: | goleafsgo123 [ Sun Jun 05, 2005 12:29 pm ] |
Post subject: | |
....anyone? |
Author: | MysticVegeta [ Sun Jun 05, 2005 1:33 pm ] | ||
Post subject: | |||
|
Author: | goleafsgo123 [ Sun Jun 05, 2005 2:36 pm ] |
Post subject: | |
Thanks you good sir, THANK YOU! |