Author Topic: SCI0: Title screen menu  (Read 1269 times)

0 Members and 1 Guest are viewing this topic.

Offline robbo007

SCI0: Title screen menu
« on: March 31, 2023, 05:48:01 PM »
Hi guys,
Has anyone created a title screen menu with start new game, restore or quit? I'm trying to get some example code so I can work out how to tackle this? I like the way the point and click SCI games had this. I want to try and implement this to my SCI0 game.

Thanks,



Offline Kawa

Re: SCI0: Title screen menu
« Reply #1 on: March 31, 2023, 06:11:13 PM »
I haven't much time this weekend to do a proper implementation from scratch but might I suggest you study script 87 in King's Quest 1?

Alternatively, there's the Easy Way Out where you just use a Print statement, with perhaps an #at to put it into position. Middle difficulty, you create the dialog yourself instead of letting Print handle it.

Offline Doan Sephim

Re: SCI0: Title screen menu
« Reply #2 on: April 02, 2023, 04:07:08 PM »
Hi guys,
Has anyone created a title screen menu with start new game, restore or quit? I'm trying to get some example code so I can work out how to tackle this? I like the way the point and click SCI games had this. I want to try and implement this to my SCI0 game.

Thanks,

I'll post what I have for Betrayed Alliance Book 2. In it, there are two Views to press, "New Game" and "Restore." You can click on them with the mouse, press "N" for new game or "R" for restore, or you can press enter if one of the two are highlighted. You can highlight them by hovering over with the mouse, or pressing of the arrow buttons.

Hopefully you can locate the parts relevant to your needs. Sorry if the code is messy...I'm not the best in the world. Also, let me know if you have questions:
Code: [Select]
;;; Sierra Script 1.0 - (do not remove this comment)
(script# 801)

(include sci.sh)
(include game.sh)
(use main)
(use game)
(use menubar)
(use obj)
(use cycle)
(use user)
(use controls)
(use feature)

(public
rm803 0
)

(local
myEvent
cursorCounter
selectNewGame = 1
selectRestore = 0

newGameChosen = 0
)

(instance rm803 of Rm
(properties
picture scriptNumber
north 0
east 0
south 0
west 0
)

(method (init)

(ProgramControl)
(= gProgramControl FALSE)
(gGame setSpeed: 3)

(SL disable:)
(TheMenuBar hide:)
(TheMenuBar state: DISABLED)
;(= gMenuBarBlock 1) ; disable menubar

(super init:)
(self setScript: RoomScript)
(switch gPreviousRoomNumber
(else
(gEgo posn: 160 105 loop: -1)
)
)
(SetUpEgo)
(gEgo init: hide: xStep: 8 yStep: 5)
(fire init: setCycle: Fwd setPri: 12)

(book2 init: setPri: 15)
(newGame init: setPri: 15)
(restore init: setPri: 15)

(darkRight init: setPri: 10)
(darkLeft init: setPri: 10)
(darkUp init: setPri: 10)
(darkDown init: setPri: 10)
(darkUp2 init: setPri: 10)
(darkDown2 init: setPri: 10)

(= gMap 1)
(= gArcStl 1)

(Load rsSOUND 1)
(gTheMusic play: 1 loop: 1 priority: -1)
)
)

(instance RoomScript of Script
(properties)

(method (doit)
(super doit:)
; code executed each game cycle

; Used to make the cursor disappear after 200 cycles
(if (> cursorCounter 0)
(-- cursorCounter)
(if(== cursorCounter 0)
(RoomScript changeState: 1)
)
)

; Used to activate which starting option
(if (< (gEgo x?) 145)
(= selectNewGame 1)
(= selectRestore 0)
(newGame cel: 1)
(restore cel: 0)
else
(if (> (gEgo x?) 200)
(= selectNewGame 0)
(= selectRestore 1)
(newGame cel: 0)
(restore cel: 1)
else
(= selectNewGame 0)
(= selectRestore 0)
(newGame cel: 0)
(restore cel: 0)
)
)

(= myEvent (Event new: evNULL))
(gEgo setMotion: MoveTo (myEvent x?)(myEvent y?))
(fire posn: (gEgo x?) (+ (gEgo y?) 15) )
(myEvent dispose:)

; Setting a Lower limit to the flame
(if(> (gEgo y?) 155)
(gEgo posn: (gEgo x?) 155)
)
; Setting an Upper Limit to the flame
(if(< (gEgo y?) 85)
(gEgo posn: (gEgo x?) 85)
)
; Setting a Left limit to the flame
(if(< (gEgo x?) 60)
(gEgo posn: 60 (gEgo y?))
)
; Setting an Right Limit to the flame
(if(> (gEgo x?) 255)
(gEgo posn: 255 (gEgo y?))
)

; Determining how the shadows overtake the title
(if (< (gEgo y?) (+ (darkDown y?)60))
(if(> (darkDown y?) 38)
(darkDown posn: (darkDown x?) (- (darkDown y?) 2) ) ; up
(darkDown2 posn: (darkDown2 x?) (- (darkDown2 y?) 2) )
)

else
(> (gEgo y?) (darkDown y?))
(if(< (darkDown y?) 80)
(darkDown posn: (darkDown x?) (+ (darkDown y?) 2) ) ; down
(darkDown2 posn: (darkDown2 x?) (+ (darkDown2 y?) 2) )
)
)
(if (> (gEgo y?) (- (darkUp y?)60))
(if(< (darkUp y?) 186)
(darkUp posn: (darkUp x?) (+ (darkUp y?) 2) ) ; down
(darkUp2 posn: (darkUp2 x?) (+ (darkUp2 y?) 2) )
)

else
(< (gEgo y?) (darkUp y?) )
(if(> (darkUp y?) 147)
(darkUp posn: (darkUp x?) (- (darkUp y?) 2) ) ; up
(darkUp2 posn: (darkUp2 x?) (- (darkUp2 y?) 2) )
)
)
(if (< (gEgo x?) (+ (darkLeft x?)120)) ; 150
(if(> (darkLeft x?) -8)
(darkLeft posn: (- (darkLeft x?) 3) (darkLeft y?) ) ;left
)

else
(> (gEgo x?) (darkLeft x?) )
(if(< (darkLeft x?) 25)
(darkLeft posn: (+ (darkLeft x?) 3) (darkLeft y?) ) ;right
)
)
(if (> (gEgo x?) (- (darkRight x?) 120)) ; 150
(if(< (darkRight x?) 332)
(darkRight posn: (+ (darkRight x?) 3) (darkRight y?) ) ;right
)

else
(< (gEgo x?) (darkRight x?) )
(if(> (darkRight x?) 287)
(darkRight posn: (- (darkRight x?) 3) (darkRight y?) ) ;left
)
)

)

(method (handleEvent pEvent button)
(super handleEvent: pEvent)
; handle Said's, etc...
(if (== (pEvent type?) evJOYSTICK)

(if (== (pEvent message?) 3)
(SetCursor 998 0 (restore x?)(restore y?))
(gEgo posn: (restore x?)(restore y?))
)
(if (== (pEvent message?) 7)
(SetCursor 998 0 (newGame x?)(newGame y?))
(gEgo posn: (newGame x?)(newGame y?))
)
(if (or (== (pEvent message?) 1) (== (pEvent message?) 5))
(SetCursor 998 0 160 105)
(gEgo posn: 160 105)
)
)

(if (== (pEvent type?) evMOUSEBUTTON)
(if selectNewGame
;(RoomScript changeState: 2)
(gRoom newRoom: 76)
else
(if selectRestore
(gGame restore:)
)
)
)
(if (== (pEvent type?) evKEYBOARD)
(if (== (pEvent message?) KEY_n)
(gRoom newRoom: 76)
)
(if (== (pEvent message?) KEY_r)
(gGame restore:)
)
(if (== (pEvent message?) KEY_RETURN)
(gRoom newRoom: 76)
;(RoomScript changeState: 2)
)
(if (== (pEvent message?) KEY_ESCAPE)
(if
(Print
{Do you really want to quit?}
#title
{Quit}
#font
gDefaultFont
#button
{ Quit_}
1
#button
{ Oops_}
0
)
(= gQuitGame TRUE)
)
)
)


)

(method (changeState newState)
(= state newState)
(switch state
(0 (= cycles 1) ; Handle state changes

)(1
(SetCursor 998 (HaveMouse))
(= gCurrentCursor 998)
)(2 (= cycles 1)
(SetCursor 999 (HaveMouse))
(= gCurrentCursor 999)
(= cursorCounter 120)
)(3
(cond
(selectNewGame
(if (not newGameChosen)
(self changeState: 4)
(= newGameChosen 1)
)


)
(selectRestore
;(= snd aud)
;(snd
;command: {stop}
;fileName: {music\\intro.mp3}
;fadeOutMillisecs: {4000}
;loopCount: {0}
;init:
;)
(gGame restore:)
)
; Code This out before release
;(else
; (gRoom newRoom: 76)
;)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
)
)
(4
(fire loop: 5 cycleSpeed: 3 setCycle: End self)
(gTheMusic fade:)
)
(5 (= cycles 20)
;(darkRight hide:)
;(darkLeft hide:)
;(darkUp hide:)
;(darkDown hide:)
;(darkUp2 hide:)
;(darkDown2 hide:)
;(Animate (DrawPic 800 dpOPEN_CENTEREDGE))

)
(6
;(gTheMusic stop:)
(gRoom newRoom: 76)
)
)
)
)
(instance book2 of Prop
(properties
y 175
x 160
view 995
loop 4
)
)
(instance newGame of Prop
(properties
y 114
x 90
view 995
loop 2
)
)
(instance restore of Prop
(properties
y 96
x 240
view 995
loop 3
)
)
(instance fire of Prop
(properties
y 35
x 47
view 429
)
)
(instance darkLeft of Prop
(properties
y 180
x 20
view 429
loop 1
)
)
(instance darkRight of Prop
(properties
y 180
x 310
view 429
loop 2
)
)
(instance darkUp of Prop
(properties
y 170
x 93 ; 160
view 429
loop 3
)
)
(instance darkUp2 of Prop
(properties
y 170
x 228
view 429
loop 3
)
)
(instance darkDown of Prop
(properties
y 60
x 93
view 429
loop 4
)
)
(instance darkDown2 of Prop
(properties
y 60
x 228
view 429
loop 4
)
)

Offline MusicallyInspired

Re: SCI0: Title screen menu
« Reply #3 on: April 03, 2023, 12:14:59 AM »
Here's my script for recreating KQ1SCI's title screen for my KQ2SCI project:

Code: [Select]
;;; Sierra Script 1.0 - (do not remove this comment)
;
; King's Quest II SCI Remake
; By Brandon Blume
(script# TITLESCREEN_SCRIPT)
(include sci.sh)
(include game.sh)
(include keys.sh)
(use main)
(use game)
(use menubar)
(use obj)
(use cycle)
(use user)
(use controls)
(use feature)

(public
TitleScreen 0
)

(local
title1 =  0
title2 =  0
sIntro =  1
sBegin =  0
sCred =  0
sCont =  0
sMenuStart =  0
bootingup = TRUE
keyheld = FALSE
indicator = {}
)

(instance TitleScreen of Rm
(properties
picture 95;scriptNumber
)

(method (init)
; Set up the title screen
(= gDefaultPalette 1)
(ProgramControl)
(= gProgramControl TRUE)
(gGame setSpeed: 4)
(SL disable:)
(SetCursor gLoadingCursor (HaveMouse))
(TheMenuBar hide:)
(super init:)
(self setScript: RoomScript)
(gEgo init: hide:)
(theRomance init: hide:)
(theThrone init: hide: )
)
)

; (send gTheMusic:prevSignal(0)stop()number(1)loop(0)play())

(instance RoomScript of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(0 (= cycles 20)
(SetCursor gLoadingCursor (HaveMouse))
)
(1
(= cycles 80)
(= bootingup FALSE)
(DrawPic scriptNumber dpOPEN_CENTEREDGE dpCLEAR gDefaultPalette)
(theRomance show:)
(theThrone show:)
(theSpark1 init: setCycle: Fwd)
(theSpark2 init: setCycle: Fwd)
(theSpark3 init: setCycle: Fwd)
(theSpark4 init: setCycle: Fwd)
(theSpark5 init: setCycle: Fwd)
(theSpark6 init: setCycle: Fwd)
(theSpark7 init: setCycle: Fwd)
(theSpark8 init: setCycle: Fwd)
(gTheMusic prevSignal: 0 stop: number: 1 loop: 0 play:)
(SetCursor gLoadingCursor 0)
(= title1
(Display
{SCI Alpha 0.1}
dsCOORD 0 170
dsALIGN alCENTER
dsWIDTH 320
dsCOLOUR clWHITE
dsBACKGROUND clTRANSPARENT
dsFONT 4
dsSAVEPIXELS
)
)
(= title2
(Display
{By: Brandon Blume}
dsFONT 4
dsCOORD 0 180
dsWIDTH 320
dsALIGN alCENTER
dsCOLOUR clWHITE
dsBACKGROUND clTRANSPARENT
dsSAVEPIXELS
)
)
)
(2
(= cycles 15)
(theRomance hide:)
(theThrone hide:)
(Display {} dsRESTOREPIXELS title1)
(Display {} dsRESTOREPIXELS title2)
)
(3
(if gDefaultPalette
(= gDefaultPalette 0)
)
(gGame setCursor: gNormalCursor (HaveMouse))
(= sMenuStart 1)
(theRomance dispose:)
(theThrone dispose:)
(Display {} dsRESTOREPIXELS title1)
(Display {} dsRESTOREPIXELS title2)
(buttonIntro init: loop: 1 setScript: pressIntro)
(buttonBegin init: loop: 2 setScript: pressBegin)
(buttonCred init: loop: 3 setScript: pressCred)
(buttonCont init: loop: 4 setScript: pressCont)
(cond
(sIntro (buttonSelect init: loop: 5 posn: 58 146))
(sBegin (buttonSelect init: loop: 5 posn: 161 146))
(sCred (buttonSelect init: loop: 5 posn: 58 165))
(sCont (buttonSelect init: loop: 5 posn: 161 165))
)
)
)
)

(method (handleEvent pEvent)
(super handleEvent: pEvent)
(if (== (pEvent type?) evKEYBOARD)
(if bootingup
(switch (pEvent message:)
(KEY_w
(= gDefaultPalette 0)
)
(KEY_W
(= gDefaultPalette 0)
)
(KEY_b
(= gDefaultPalette 2)
)
(KEY_B
(= gDefaultPalette 2)
)
(KEY_p
(= gDefaultPalette 3)
)
(KEY_P
(= gDefaultPalette 3)
)
)
else
(cond
((== (pEvent message:) KEY_RETURN)
(if sMenuStart
(cond
(sBegin (gTheMusic fade:) (gRoom newRoom: INITROOMS_SCRIPT))
(sCont (gGame restore:))
(sIntro
(= gIntro 1)
(gTheMusic fade:)
(gRoom newRoom: INTRO_SCRIPT)
)
(sCred
(= gCred 1)
(gTheMusic fade:)
(gRoom newRoom: INTROCREDITS_SCRIPT)
)
)
else
(RoomScript changeState: 3)
)
)
(sMenuStart
(Print
{Use the arrow keys then enter or mouse to select option.}
)
)
)
)
)
(if (== (pEvent type?) evJOYSTICK)
(if sMenuStart
(if (== (pEvent message:) 1) (selectorCheckUp)) ; UP
)
)
(if (== (pEvent type?) evJOYSTICK)
(if sMenuStart
(if (== (pEvent message:) 5) (selectorCheckDown)) ; Down
)
)
(if (== (pEvent type?) evJOYSTICK)
(if sMenuStart
(if (== (pEvent message:) 7) (selectorCheckLeft)) ; Left
)
)
(if (== (pEvent type?) evJOYSTICK)
(if sMenuStart
(if (== (pEvent message:) 3) (selectorCheckRight)) ; Right
)
)
(if (== (pEvent type?) evMOUSEBUTTON)
(if sMenuStart
(cond
(
(and
(> (pEvent x?) (buttonBegin nsLeft?))
(< (pEvent x?) (buttonBegin nsRight?))
(> (pEvent y?) (buttonBegin nsTop?))
(< (pEvent y?) (buttonBegin nsBottom?))
)
(if sBegin
(selectorZero)
(= sBegin 1)
(gTheMusic fade:)
(gRoom newRoom: INITROOMS_SCRIPT)
else
(pressBegin changeState: 2)
)
)
(
(and
(> (pEvent x?) (buttonCont nsLeft?))
(< (pEvent x?) (buttonCont nsRight?))
(> (pEvent y?) (buttonCont nsTop?))
(< (pEvent y?) (buttonCont nsBottom?))
)
(if sCont
(selectorZero)
(= sCont 1)
(gGame restore:)
else
(pressCont changeState: 2)
)
)
(
(and
(> (pEvent x?) (buttonCred nsLeft?))
(< (pEvent x?) (buttonCred nsRight?))
(> (pEvent y?) (buttonCred nsTop?))
(< (pEvent y?) (buttonCred nsBottom?))
)
(if sCred
(selectorZero)
(= gCred 1)
(gTheMusic fade:)
(gRoom newRoom: INTROCREDITS_SCRIPT)
else
(pressCred changeState: 2)
)
)
(
(and
(> (pEvent x?) (buttonIntro nsLeft?))
(< (pEvent x?) (buttonIntro nsRight?))
(> (pEvent y?) (buttonIntro nsTop?))
(< (pEvent y?) (buttonIntro nsBottom?))
)
(if sIntro
(selectorZero)
(= gIntro 1)
(gTheMusic fade:)
(gRoom newRoom: INTRO_SCRIPT)
else
(pressIntro changeState: 2)
)
)
(else
(Print
{Use the arrow keys then enter or mouse to select option.}
)
)
)
else
(RoomScript changeState: 3)
)
)
)
)


; Menu Selector Procedures
; Menu select UP
(procedure (selectorCheckUp)
(cond
(sBegin (selectorZero) (= sCred 1) (buttonSelect posn: 58 165))
(sCont (selectorZero) (= sBegin 1) (buttonSelect posn: 161 146))
(sCred (selectorZero) (= sIntro 1) (buttonSelect posn: 58 146))
(sIntro (selectorZero) (= sCont 1) (buttonSelect posn: 161 165))
)
)

; Menu select DOWN
(procedure (selectorCheckDown)
(cond
(sBegin (selectorZero) (= sCont 1) (buttonSelect posn: 161 165))
(sCont (selectorZero) (= sIntro 1) (buttonSelect posn: 58 146))
(sCred (selectorZero) (= sBegin 1) (buttonSelect posn: 161 146))
(sIntro (selectorZero) (= sCred 1) (buttonSelect posn: 58 165))
)
)

; Menu select LEFT
(procedure (selectorCheckLeft)
(cond
(sBegin (selectorZero) (= sIntro 1) (buttonSelect posn: 58 146))
(sCont (selectorZero) (= sCred 1) (buttonSelect posn: 58 165))
(sCred (selectorZero) (= sBegin 1) (buttonSelect posn: 161 146))
(sIntro (selectorZero) (= sCont 1) (buttonSelect posn: 161 165))
)
)

; Menu select RIGHT
(procedure (selectorCheckRight)
(cond
(sBegin (selectorZero) (= sCred 1) (buttonSelect posn: 58 165))
(sCont (selectorZero) (= sIntro 1) (buttonSelect posn: 58 146))
(sCred (selectorZero) (= sCont 1) (buttonSelect posn: 161 165))
(sIntro (selectorZero) (= sBegin 1) (buttonSelect posn: 161 146))
)
)

; Reset all menu buttons (for use when enabling a buttons variable)
(procedure (selectorZero)
(= sBegin 0)
(= sCont 0)
(= sCred 0)
(= sIntro 0)
)

; Mouse click on new button instances
; when selector is not currently on them
; Mouse click on Begin Game button
(instance pressBegin of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(2
(= cycles 1)
(selectorZero)
(= sBegin 1)
(buttonSelect posn: 161 146)
)
(3
(gTheMusic fade:)
(gRoom newRoom: INITROOMS_SCRIPT)
)
)
)
)

; Mouse click on Introduction button
(instance pressIntro of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(2
(= cycles 1)
(selectorZero)
(= sIntro 1)
(buttonSelect posn: 58 146)
)
(3
(gTheMusic fade:)
(gRoom newRoom: INTRO_SCRIPT)
)
)
)
)

; Mouse click on Credits button
(instance pressCred of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(2
(= cycles 1)
(selectorZero)
(= sCred 1)
(buttonSelect posn: 58 165)
)
(3
(gTheMusic fade:)
(gRoom newRoom: INTROCREDITS_SCRIPT)
)
)
)
)

; Mouse click on Continue Game button
(instance pressCont of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(2
(= cycles 3)
(selectorZero)
(= sCont 1)
(buttonSelect posn: 161 165)
)
(3 (gGame restore:))
)
)
)

; Forward then backward "Shimmer" animation
(instance shimmerScript of Script
(properties)

(method (changeState newState)
(= state newState)
(switch state
(1
(theSpark1 setCycle: End shimmerScript)
)
(2
(theSpark1 setCycle: Beg shimmerScript)
)
(3
(shimmerScript changeState: 1)
)
)
)
)
                                                ; make it all loop around forever!
; Prop Instances
(instance theRomance of Prop
(properties
x 86
y 166
view 913
cel 0
)
)

(instance theThrone of Prop
(properties
x 236
y 162
view 913
cel 1
)
)

(instance theSpark1 of Prop
(properties
; x 61 //KQ1
; y 27 //KQ1
x 67                ; KQ4
y 26                ; KQ4
view 950
cycleSpeed 2
)
)

(instance theSpark2 of Prop
(properties
x 97                ; Both
y 59                ; Both
view 950
cycleSpeed 3
cel 2
)
)

(instance theSpark3 of Prop
(properties
; x 130 //KQ1
; y 21 //KQ1
x 142               ; KQ4
y 20                ; KQ4
view 950
cycleSpeed 2
cel 4
)
)

(instance theSpark4 of Prop
(properties
; x 182 //KQ1
; y 21 //KQ1
x 187               ; KQ4
y 28                ; KQ4
view 950
cycleSpeed 1
)
)

(instance theSpark5 of Prop
(properties
; x 208 //KQ1
; y 54 //KQ1
x 213               ; KQ4
y 62                ; KQ4
view 950
cycleSpeed 7
cel 1
)
)

(instance theSpark6 of Prop
(properties
; x 264 //KQ1
; y 32 //KQ1
x 268               ; KQ4
y 38                ; KQ4
view 950
cycleSpeed 5
)
)

(instance theSpark7 of Prop
(properties
x 143
y 89
view 950
cycleSpeed 6
cel 3
)
)

(instance theSpark8 of Prop
(properties
x 174
y 117
view 950
cycleSpeed 4
)
)

(instance buttonIntro of Prop
(properties
x 58
y 146
view 950
)
)

(instance buttonBegin of Prop
(properties
x 161
y 146
view 950
)
)

(instance buttonCred of Prop
(properties
x 58
y 165
view 950
)
)

(instance buttonCont of Prop
(properties
x 161
y 165
view 950
)
)

(instance buttonSelect of Prop
(properties
; x 58
; y 146
view 950
)
)
Brass Lantern Prop Competition

Offline robbo007

Re: SCI0: Title screen menu
« Reply #4 on: April 03, 2023, 12:05:37 PM »
Thanks guys. That give me something to work on. I see both of you are using view's for the buttons. Is this a better way than doing it like what Eric does in the SCI0 Template Redux. He uses the a procedure with the display command. Trouble is his template is heavily modified so most things don't work under the SCI0 template that comes with Phil's SC.

Code: [Select]
(procedure (ShowButtonText)
(RedrawCast)
(Display  "Start Game"
p_at 30 175
p_font 4
p_color vYELLOW
)
(Display "Restore Game"
p_at 125 175
p_font 4
p_color vYELLOW
)
(Display "Quit Game"
p_at 230 175
p_font 4
p_color vYELLOW
)
)


Offline Doan Sephim

Re: SCI0: Title screen menu
« Reply #5 on: April 03, 2023, 12:20:57 PM »
I could see Displays working roughly the same. I guess I prefer Views because it allows more freedom for editing than just using a font.

Offline robbo007

Re: SCI0: Title screen menu
« Reply #6 on: April 04, 2023, 07:26:17 AM »
@MusicallyInspired

Just messing around with your script. Which part of the change state handles returning the player controls and showing the menu bar again after Begin game is selected? I managed to get it to start a new game which loads my first room's script but don't have controls or a menu bar.
Thanks,

Offline gumby

Re: SCI0: Title screen menu
« Reply #7 on: April 04, 2023, 09:12:52 PM »
Search this site for handsOn or handsOff.  Something like this is what you are looking for in the init of your first room:

Code: [Select]
(gGame handsOn:)
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline robbo007

Re: SCI0: Title screen menu
« Reply #8 on: April 05, 2023, 05:01:53 PM »
Thanks Gumby.
I've never managed to get handsOn/handsOff working on the SCI0 template. I've seen it in the LSL source I think? Maybe I'm using the wrong syntax.

I managed to get it working with:

Code: [Select]
                (TheMenuBar draw:)
(PlayerControl)
(SL enable:)

Thanks,

Offline MusicallyInspired

Re: SCI0: Title screen menu
« Reply #9 on: April 08, 2023, 10:26:44 PM »
Yep, those are the 3 lines I use in the "InitRooms" script that is called after you select Start Game from the title screen. But you can do it anywhere. I also used "(= gProgramControl FALSE)" but that's probably superfluous.
Brass Lantern Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.031 seconds with 23 queries.