Computer Science Canada Need help in turing. Changing screens. |
Author: | feebas200 [ Thu Mar 31, 2011 3:40 pm ] |
Post subject: | Need help in turing. Changing screens. |
Hi there, I'm new to this forum. What I want to do is make is so I can change screens back and fourth like rooms. I know how to make the buttons for it but I don't know the command for it top go back to the first part of the program. I can make the continue and move forward to the next room but it can't return to previous rooms after. I hope someone helps, Thanks in advance. ![]() Version of turing 4.1 |
Author: | Insectoid [ Thu Mar 31, 2011 3:46 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
You're being very vague here. We need more information. |
Author: | feebas200 [ Thu Mar 31, 2011 4:04 pm ] |
Post subject: | Re: Need help in turing. Changing screens. |
like a button that switches between two screens. A button that makes you go to a living room and another button going to like kitchen something like that. So when you press the button you go to the living room and when you press another button you return to kitchen. And the button works forever. Making it so when you press the button the current room clears and you end up in another room. Like entering a menu screen, you press a button to go to intructions, but you can return to menu screen. |
Author: | Tony [ Thu Mar 31, 2011 4:19 pm ] | ||
Post subject: | RE:Need help in turing. Changing screens. | ||
loops.
|
Author: | feebas200 [ Thu Mar 31, 2011 5:08 pm ] | ||
Post subject: | Re: Need help in turing. Changing screens. | ||
That's not what I mean. You see the first part of my program? It basically exits so it goes to another room, however, I can't make a button to return to the first room. The % surrounded part of the program is where i`m trying to make it get back to top. But once I exit I can`t get back to the first room. |
Author: | Raknarg [ Thu Mar 31, 2011 6:58 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
Just out of curiosity, is there any real benifit to using GUI buttons as opposed to Mouse.Where buttons? If not, I would suggest those, they seem to be simpler than GUIs. |
Author: | feebas200 [ Thu Mar 31, 2011 7:04 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
Oh, I found out how to do the mousewhere buttons recently, this is a school project so I don't want to redo the GUI buttons so I left it there. Any suggestions for changing screens back and forth? |
Author: | Tony [ Thu Mar 31, 2011 8:14 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
I'm telling you -- loops. This tutorials is particularly relevant -- http://compsci.ca/v3/viewtopic.php?t=370 |
Author: | feebas200 [ Thu Mar 31, 2011 8:36 pm ] | ||
Post subject: | Re: Need help in turing. Changing screens. | ||
EDIT~~~~ I Managed to get back to first room but it is automatic and not manual. I don't get why it's going to the other room automatically. I tried using exitwhen but the screen stays white because i needed to use cls. If i try to make it exit when I click the mouse at a certain location then it just reloops the room, it only works when I use only exit right after endloop
|
Author: | feebas200 [ Sun Apr 03, 2011 6:31 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
i still need help. :[. My assignment will be due soon. |
Author: | Tony [ Sun Apr 03, 2011 6:46 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
If you have just an "exit", then it will always ("automatically") exit from the loop. |
Author: | feebas200 [ Sun Apr 03, 2011 8:00 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
But when I try to use "exit when b1=1" it doesn't go back to start anymore. Trick doesn't work. Any suggestions? |
Author: | Tony [ Sun Apr 03, 2011 8:04 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
so presumably b1 is either never 1 at that point, or it is, and so the code does something other than you're expecting. Time to investigate further. |
Author: | feebas200 [ Mon Apr 04, 2011 8:03 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
~~~~~~~RESOLVED~~~~~~~~~~~~~~~~~~well now the room changes when i click anywhere on the screen, how do I make it at a certain area? My button just replays the room right now but if i click anywhere else then the button then it will change rooms. I tried "exit when y1 < 50 and x1 < 150 and b1 =1" but the button just replays the current screen now.#~~~~~~~~~~~~~~~~~~~~~~ |
Author: | Tony [ Mon Apr 04, 2011 8:40 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
I'll make a wild guess that when that loop exits, you are still holding the mouse down in that in that area (and/or the variables still hold such values). Use put statements to confirm that all the variables hold the values that you expect them to, and that code is executing in places where you expect it to. If you must keep clears, add enough delays to allow you to read this information. |
Author: | feebas200 [ Mon Apr 04, 2011 8:48 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
Well, this problem is solved, i used boolen to exit. Much easier haha. Thanks, wouldn't have made it without your hints. |
Author: | TokenHerbz [ Mon Apr 04, 2011 10:26 pm ] |
Post subject: | RE:Need help in turing. Changing screens. |
%%if in room Xroom then draw X room / move X room and Boundries apply, If Xroom Door 1 = true then Xroom = Door 1 room = win ![]() right? |