| Author | Message |
|---|---|
| goodatjavabadatturing |
Post Posted: Wed May 24, 2023 9:32 am Post subject: Assistance required with structuring a game similar in function to MYST. Mainly switching screens
|
| What is it you are trying to achieve?
Attempting to create a MYST-like game where screens are switched bwtween using buttons, and puzzles are found throuhgout. What is the problem you are having? I seem to have issues with handling more than 2 screens thanks to the way turing interperets proccesses. Is there any way to Correct this issue and have it run as intended? Describe what you have tried to solve this problem I have reordered the procedures multiple times, and attempted to bypass the issue by seperating the processes into their own files and using the include command on all of them at the same time. This does not work either Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here> Turing: %IMPORTANT!!!! Run under regular turing app instead of VScode, item crashes when VSCode debug mode is used %Pic commands have issue with turing VSCode extension %this is a certified hood classic import GUI var funnysussy:string var health:int var x1, y1, b1 : int var scene:int var r1:int var dooropen:int var ts: array char of boolean put "tMyst FP alpha 1" var r2:int dooropen := 0 delay (500) cls delay (1000) proc switch2 cls setscreen ("graphics:1920;1080,nobuttonbar,position:center;center,offscreenonly") r2:=Pic.FileNew ("screen2.bmp") scene := 2 Pic.Draw (r2, 0 , 0, picMerge ) View.Update loop if dooropen = 0 then var buttoninteract:int:=GUI.CreateButton (960, 540,0, "interact" ,puzzle) exit when GUI.ProcessEvent end if end loop end switch2 proc switchhandler switch2 end switchhandler proc puzzle cls setscreen ("text:1920;1080,nobuttonbar,position:center,offscreenonly") View.Update colour (black ) put "three buttons appear before you, a peice of paper beside them reads, twenty-three is number one" put "in what order do you push the buttons" put "(answer with a space between the 3 numbers and NO COMMAS)" loop get funnysussy if funnysussy = "231" then put "correct! The linking book to the age of Channelwood awaits!" dooropen:= 1 delay (2000) cls switchhandler else put "incorrect" delay (2000) end if exit when dooropen = 1 end loop end puzzle %Set up Game Screen setscreen ("graphics:1920;1080,nobuttonbar,position:center;center,offscreenonly") colorback (white ) color (black ) View.Update scene := 1 drawfillbox (0, 0, 200, 50, black ) r1:=Pic.FileNew ("room1.bmp") Pic.Draw (r1, 0, 0, picMerge ) loop var buttonleft:int:=GUI.CreateButton (50, 0,0, "left" ,switch2) exit when GUI.ProcessEvent end loop Please specify what version of Turing you are using OpenTuring 1.0.1 under wine, KDE NEON 5.27 |
|