Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - robbo007

Pages: [1] 2 3 ... 8
1
SCI Syntax Help / Re: changeState woos
« on: Today at 11:53:04 AM »
Thanks for the reply. I think I was messing things up pointing to and from RoomScript and IvanaScript. I've made it a little simpler by moving all of Ivana's actions into her script. But I still have the moonwalk animation when she is returning to the counter after being at the soda machine, which is changeState 16 onwards of the IvanaScript. There is also the issue that sometimes she still walks off her path as indicated in the sreenshot2.

What is happening in the scene is the following:
Ivana is running her IvanaScript changeState 0 through to 7 (which is walking back a forward behind the counter. She will only stop if talked to by ego and this goes to changeState 8 to 11 then goes back to walking behind the counter changestate 0.

When ego presses the button on the soda machine with the said:
Code: [Select]
(if (Said 'press/button')
(self changeState: 1)
)
)
this triggers (RoomScript changeState 0 through to 5 then queue's Ivanascript on changeState 6). This then makes Ivana walk out from behind the counter using changeState 12 to 21 changeStates of the Ivanascript.

New RoomScript changeStates:
Code: [Select]
(method (changeState newState)
(ShowState self newState 1 2) ; Displays changeState info on screen when debug is enabled.
(= state newState)
(switch state
(0
)
(1 ; Ego goes to soda Machine
(ProgramControl)
(gEgo
illegalBits: 0
ignoreActors:
setMotion: MoveTo 158 177 self
)
)
(2 ; Ego presses soda machine button
(gEgo
cycleSpeed: 1
view: 707
setLoop: 2
setCycle: End self
)
)
(3 ; Done pressing button
(gEgo setCycle: Beg self)
)
(4 ;Soda machine turns on
(gEgo view: 000 setCycle: Walk loop: 3)
(ProgramControl)
(aSoda setCycle: Fwd)
(self changeState: 5)
)
(5
(PlayerControl)
(SetUpEgo) ;this sets ego back to normal
(= cycles 10)
)
(6
(aIvanaScript cue: changeState: 12) ; Ssets up Ivana script to move out behind counter and move to the sosa machine.
)

)

)
)

New IvanaScript changestate:
Code: [Select]
(method (changeState newState &tmp IvanaLoop)
(ShowState self newState 1 2) ; Displays changeState info on screen when debug is enabled.
(switch (= state newState)
(0
(= seconds (Random 4 8))
)
(1
(aIvana
illegalBits: 0
setPri: 8
cycleSpeed: 0
setLoop: -1
setCycle: Walk
setMotion: MoveTo 72 124 self ;Ivanna walks up
)
)
(2
(= seconds (Random 4 8))
)
(3
(aIvana setMotion: MoveTo 53 138 self) ;Ivanna walk down
)
(4
(= seconds (Random 4 8))
)
(5
(aIvana setMotion: MoveTo 53 134 self) ;Ivanna walk down part 2
)
(6
(= seconds (Random 3 9)) ; Ivana does some random poses
(switch (= IvanaLoop (Random 0 5))
(0
(aIvana loop: 6 cycleSpeed:4 setCycle: End self)
)
(1
(aIvana loop: 7 cycleSpeed:4 setCycle: End self)
)
(else
(= state -1)
)
)
)

(7
(self changeState: 0) ;Returns to the start. Only interupted if talked to.
)
(8
(aIvana setMotion: MoveTo 63 128 self) ; Let's try and talk. Ivanna stops and goes to central point.
)
(9
(aIvana setLoop: 5 cycleSpeed:4 setCycle: Beg) ;Talk a little
(= seconds 3)
)
(10
(aIvana setCel: 0 setLoop: 0)
(= cycles 10)
)
(11
(cond
(register
(switch register
(101
(PrintA 33 7) ; "test 2"
)
(102
(PrintA 33 6) ; "test 3"
)
)
)

(else
(switch msgVar
(0
(PrintA 33 8) ; "test 1"
)
(1
(PrintA 33 9) ; "Yes? May I help you?"
)
(2
(PrintA 33 10) ; "Would you like me to call security?"
)
(3
(PrintA 33 11) ; "How may I help you?"
)
)
(if (> (++ msgVar) 3)
(= msgVar 0)
)
)
)
(self changeState: 0) ;Start all over again.
)
(12
(aIvana
illegalBits: 0
cycleSpeed: 0
setLoop: -1
setCycle: Walk
setMotion: MoveTo 78 120 self ;Ivana walks out behind desk
)
)
(13 ;Ivana walks path to soda machine
(aIvana setPri: -1 setMotion: MoveTo 111 119 self)
)
(14 ;Ivana walks path to soda machine
(aIvana setMotion: MoveTo 87 179 self)
)
(15 ;Ivana walks path to soda machine
(aIvana setMotion: MoveTo 143 179 self)
)
(16 ;Ivana faces soda machine and scratches head and waits.
(aIvana loop: 6 cycleSpeed: 2 setCycle: End self)
;(= cycles 20)
)
(17
(aSoda setCel: 0) ;Soda machine stops.
(aIvana setCycle: Walk setLoop: -1)
(aIvana setMotion: MoveTo 143 173 self) ;Ivana starts walk back to counter.
(self changeState: 18)
)
(18 ;Ivana walks path back behind counter
(aIvana setMotion: MoveTo 87 179 self)
)
(19 ;Ivana walks path back behind counter
(aIvana setMotion: MoveTo 111 119 self)
)
(20 ;Ivana walks path back behind counter
(aIvana setCycle: Beg setMotion: MoveTo 78 120 self)
)
(21 ;Ivana walks path back behind counter
(aIvanaScript changeState: 1)
)

)
)
)

I've had to add in the Ivanascript changestates number 17 (self changeState: 18) otherwise it would not move onto changeState 18. It was getting stuck there for some reason? I forced the Cycler there to setCycle Walk also. Not sure if this is right?

There are things I still dont fully understand with the changeStates. When to setCycler, when to use Beg, When to use self. Does the order of the syntax's affect the outcome? eg: putting SetCycler: before setMotion etc.

2
SCI Syntax Help / changeState woos
« on: Yesterday at 02:13:47 PM »
Hi Guys,
I've got some issues with calling a changeState from within a changeState.

I have my RoomScript changeState and an actors changeState (IvanaScript).

Code: [Select]
(method (handleEvent pEvent)
(super handleEvent: pEvent)
; handle Said's, etc...
(if (Said 'press/button')
(self changeState: 1)
)
)
(method (changeState newState)
(ShowState self newState 1 2) ; Displays changeState info on screen when debug is enabled.
(= state newState)
(switch state
(0
)
(1 ; Ego goes to soda Machine
(ProgramControl)
(gEgo
illegalBits: 0
ignoreActors:
setMotion: MoveTo 158 177 self
)
)
(2 ; Ego presses soda machine button
(gEgo
cycleSpeed: 1
view: 707
setLoop: 2
setCycle: End self
)
)
(3 ; Done pressing button
(gEgo setCycle: Beg self)
)
(4 ;Soda machine turns on
(gEgo view: 000 setCycle: Walk loop: 3)
(ProgramControl)
(aSoda setCycle: Fwd)
(self changeState: 5)
)
(5
(PlayerControl)
(SetUpEgo) ;this sets ego back to normal
(= cycles 10)
)
(6
(aIvanaScript changeState: 12)
)
(7 ;Ivana walks path back behind counter
(aSoda setCel: 0)
(aIvana setCycle: Walk setMotion: MoveTo 143 17 self)
)
(8 ;Ivana walks path back behind counter
(aIvana setMotion: MoveTo 87 179 self)
)
(9 ;Ivana walks path back behind counter
(aIvana setMotion: MoveTo 111 119 self)
)
(10 ;Ivana walks path back behind counter
(aIvana setCycle: Beg setMotion: MoveTo 78 120 self)
)
(11 ;Ivana walks path back behind counter
(aIvana priority: 8)
(aIvanaScript changeState: 0)
)

)

)
)

Code: [Select]
(method (changeState newState &tmp IvanaLoop)
(ShowState self newState 1 2) ; Displays changeState info on screen when debug is enabled.
(switch (= state newState)
(0
(= seconds (Random 4 8))
)
(1
(aIvana
illegalBits: 0
cycleSpeed: 0
setLoop: -1
setCycle: Walk
setMotion: MoveTo 72 124 self ;Ivanna walks up
)
)
(2
(= seconds (Random 4 8))
)
(3
(aIvana setMotion: MoveTo 53 138 self) ;Ivanna walk down
)
(4
(= seconds (Random 4 8))
)
(5
(aIvana setMotion: MoveTo 53 134 self) ;Ivanna walk down part 2
)
(6
(= seconds (Random 3 9)) ; Ivana does some random poses
(switch (= IvanaLoop (Random 0 5))
(0
(aIvana loop: 6 cycleSpeed:4 setCycle: End self)
)
(1
(aIvana loop: 7 cycleSpeed:4 setCycle: End self)
)
(else
(= state -1)
)
)
)

(7
(self changeState: 0) ;Returns to the start. Only interupted if talked to.
)
(8
(aIvana setMotion: MoveTo 63 128 self) ; Let's try and talk. Ivanna stops and goes to central point.
)
(9
(aIvana setLoop: 5 cycleSpeed:4 setCycle: Beg) ;Talk a little
(= seconds 3)
)
(10
(aIvana setCel: 0 setLoop: 0)
(= cycles 10)
)
(11
(cond
(register
(switch register
(101
(PrintA 33 7) ; "test 2"
)
(102
(PrintA 33 6) ; "test 3"
)
)
)

(else
(switch msgVar
(0
(PrintA 33 8) ; "test 1"
)
(1
(PrintA 33 9) ; "Yes? May I help you?"
)
(2
(PrintA 33 10) ; "Would you like me to call security?"
)
(3
(PrintA 33 11) ; "How may I help you?"
)
)
(if (> (++ msgVar) 3)
(= msgVar 0)
)
)
)
(self changeState: 0) ;Start all over again.
)
(12
(aIvana
illegalBits: 0
cycleSpeed: 0
setLoop: -1
setCycle: Walk
setMotion: MoveTo 78 120 self ;Ivanna walks out behind desk
)
)
(13 ;Ivanna walks path to soda machine
(aIvana setPri: -1 setMotion: MoveTo 111 119 self)
)
(14 ;Ivanna walks path to soda machine
(aIvana setMotion: MoveTo 87 179 self)
)
(15 ;Ivanna walks path to soda machine
(aIvana setMotion: MoveTo 143 179 self)
)
(16 ;Face soda machine and scratches head and waits.
(aIvana setCel: 1 setLoop: 6)
(= cycles 20)
)
(17
(RoomScript changeState: 7)
)
)
)
)

The first issue is when Ivana reaches the SodaMachine . Ego presses the button and she comes out from behind the desk and walks to the sodamachine, but she gets stuck on changeState 7 of the RoomScript changeState. (See screenshot 1)

The second problem is randomly, Ivana does not walk her programmed MoveTo path in the IvanaScript changeState. She will randomly walk behind the SodaMachine doing a completely differnt moveto path that I've not specified.  (see screenshot 2)

Questions: If you are calling different changeStates and jumping between different scripts is there anything special syntax that is needed to avoid any problems? I'm just using the scriptname changeState: x syntax to do this.

Also how do I make sure the Cycler is on Walk when the actor needs to start moving when I use the MoveTo command? Sometimes the actor just seems to moonwalk the MoveTo coordinates. I know with ego you can use the (SetupEgo) syntax. Can this be done with actors? the (SetUpActor) jsut causes a crash.

Thanks,



3
SCI Syntax Help / Re: Telephones
« on: March 22, 2025, 06:35:41 AM »
I'm glad I ended up going with the graphic interface after all!

Hi,
Would you be able to share what you did in end with the graphics interface and mouse script? I'm looking to do something similar for a scene I have planned.
Thanks,

4
SCI Syntax Help / Re: SCI0: Issues implementing Trite Phrase Menu item
« on: December 11, 2024, 07:13:22 AM »
Right solved.
I was not declaring my string1 correctly. Same problem as Kawa pointed out earlier. I needed to use [string1 40] in the local instead of what I was using string1.

From what I understand was going on here is its placing the gExpletive into string1 and it was not big enough to hold it hence the weirdness with the view naming error.

Code: [Select]
(Print  (Format @string1 029 47 gExpletive)
Thanks again everyone :)

5
SCI Syntax Help / Re: SCI0: Issues implementing Trite Phrase Menu item
« on: December 10, 2024, 12:56:04 PM »
Like I said, that would be [gExpletive 20] in SCI Companion. gExpletive = 20 defines one variable preset to the number value 20, which is entirely different, while [gExpletive 20] would define gExpletive and then add nineteen more blank slots until the next global variable, which means there's space for 40 characters.

Aha! I did not know that. Thanks Kawa :)

Its seemed to have resolved the expletive issue. No crashing between rooms any-more :)  But it has also created some bugs with the dying script when using the (Print  (Format @string1 029 47 gExpletive) leaving the room and coming back and trying to die it get some random text added to my view.  I need to troubleshoot it a little more.

Why does the sluicebox code not use this? It only declares it in the main.sc as a local gExpletiveBuffer and gExpletive.

6
SCI Syntax Help / Re: SCI0: Issues implementing Trite Phrase Menu item
« on: December 09, 2024, 01:02:49 PM »
Question. How is gExpletive defined to begin with?

In the LSL games, the trite phrase and expletive are specifically defined as 20 words/40 characters In SCI Companion, that'd be (local ... [gExpletive 20] ...).

(Edit: corrected, I misread the OG source)

I was looking at the original source and its defined in script 10. I see other comments in the code as you mentioned in the game.sh

 
Code: [Select]
       filthLevelBuffer 170 ;** NOTE: 30 characters long
expletiveBuffer 200 ;** NOTE: 40 characters long

Code: [Select]
(expletiveI
(GetInput (Format @string expletive) 38
{Enter your favorite expletive:})
(if ( > (StrLen @string) 4)
(Format expletive @string)
)
)

I define it in the menubar.sc:

Code: [Select]
(MENU_EXPLETIVE
(GetInput (Format @temp4 gExpletive) 38
{Enter your favorite expletive:}
)
(if (> (StrLen @temp4) 4)
(Format gExpletive @temp4)
)
)

I also have these in my main.sc
Code: [Select]
gExpletive
;This is used for the expletive menu
gExpletiveBuffer
;This is the buffer used for the expletive menu
gFilthLevelBuffer
;This is the buffer used for the filth level

I've tried adding = 20 to the gExpletive and gExpletiveBuffer but it still crashes. Its gotta be something with the character length as using something with 8 characters works.

290.sc
Code: [Select]
(= gExpletive
(Format @gExpletiveBuffer 290 0) ;%s
)
(Format @gFilthLevelBuffer 290 0) ;%s



7
SCI Syntax Help / Re: SCI0: Issues implementing Trite Phrase Menu item
« on: December 08, 2024, 01:23:52 PM »
Sluice's decompile has the menu item as switch 776. You define MENU_EXPLETIVE as $0309. 0x0309 is decimal 777, so presuming `^x is 776 this shouldn't trigger at all, right? You've said "If I use %s in my text file 290 1 it works but does not show a default Trite phrase when selecting it from the menu.".

Did you do that background? Pretty cool.

So if I define the @gExpletiveBuffer in room 290 to use a pre-filled text like
Code: [Select]
(= gExpletive (Format @gExpletiveBuffer 290 1)) ; "Have a nice day."  I get the crash on start up. (Attached picture)

If I define it to use the variable %s:
Code: [Select]
(= gExpletive
(Format @gExpletiveBuffer 290 0) ;%s
)

It does not crash on startup, you can enter in a expletive text and if calling the @gExpletiveBuffer in your roomscript you do get it printed on screen. When changing rooms it will crash if the number of characters entered into the expletive is more than 8.




8
SCI Syntax Help / Re: SCI0: Issues implementing Trite Phrase Menu item
« on: December 06, 2024, 12:33:47 PM »
As you guys mentioned in the other post this error seems to be similar. If I add the trite phrase via the menu it will then crash when I change rooms.



9
SCI Syntax Help / Re: SCI0: Varibles and changestates
« on: December 04, 2024, 12:47:14 PM »
Amazing guys that did the job.

So I've added the show_state script 797 to my main.sc but I dont really understand what's happening and why would I need to add something there? What is it doing and what is best practice here? Should I be adding other scripts here like my regions path script maybe? Does this free up heap space as I'm already skating on thin ice with that.

Code: [Select]
(method (startRoom roomNum)
(DisposeLoad
NULL
FILEIO_SCRIPT
JUMP_SCRIPT
EXTRA_SCRIPT
WINDOW_SCRIPT
TIMER_SCRIPT
FOLLOW_SCRIPT
REV_SCRIPT
DCICON_SCRIPT
DOOR_SCRIPT
AUTODOOR_SCRIPT
WANDER_SCRIPT
AVOID_SCRIPT
DPATH_SCRIPT
SHOW_STATE ;script 797
)
(DisposeScript DISPOSELOAD_SCRIPT)

10
SCI Syntax Help / Re: SCI0: Varibles and changestates
« on: December 04, 2024, 06:04:45 AM »
Right I've found the issue. I was using this script taken from LSL3 to check the changeState numbers to troubleshoot my changeState scripting. It displays the State number at the top of the screen in realtime. Any ideas why that causes the crash? Its a very handy little script.

I call this on my method for the peephole door changeState:

Code: [Select]
(method (changeState newState)
(ShowState self newState 1 2)
(switch (= state newState)

Code: [Select]
;;; Sierra Script 1.0 - (do not remove this comment)
;**
;** Logics for room 797 -- Just a showState procedure
;**
;** Leisure Suit Larry 4 - Never say Nontoonyt (AKA The Missing Floppies)
;**
;** Last Update: October 8th, 2024
;**
(script# 797)
(include sci.sh)
(include game.sh)
(use Main)

(public
ShowState 1
)
(procedure (TestFlag flag)
(return
(if (& [gFlagArray (/ flag 16)] (>> $8000 (mod flag 16))) 1 else 0)
)
)
(procedure (ShowState whatScript newState where color &tmp [str 33])
(if (and gDebugging (not (TestFlag 14)))
(if (< argc 2)
(= where 1)
)
(if (< argc 3)
(= color 7)
)
(Display
(Format @str 797 0 (whatScript name:) (whatScript state:) newState) ; "%s was state %d; is now state %d."
dsCOORD
1
(- (* 8 where) 7)
dsFONT
999
dsCOLOR
color
dsBACKGROUND
0
)
)
)

11
SCI Syntax Help / Re: SCI0: Varibles and changestates
« on: December 02, 2024, 06:14:30 AM »
OK, so this seems to be connected to the same issue as your earlier ego initialization problem (in the trite phrase thread). The debugger hits at a callb $1 instruction, which is the first instruction after the fault. callb $1 corresponds to (SetUpEgo), so the faulting instruction is one of the sends just before that line, which both send to gEgo. You can double-check by viewing the value of gEgo (global 0): In the debugger, press g then enter the number zero. The next input box after that lets you see the current value of global 0, and optionally to change it. I am guessing that gEgo is 0 at this point.

What did you do about the problem in the trite phrase thread?

You are right its gEgo is 0. Do you know why is it not picking up the changes I've made to main.sc ? Or is my syntax in main.sc wrong?
Regards,

12
SCI Syntax Help / Re: SCI0: Varibles and changestates
« on: November 29, 2024, 05:43:54 AM »
I think your onto something here. I did not fix the Trite phrase yet but it does the same thing when I add a trite phrase and change rooms.

My main.sc has the following line:
Code: [Select]
(User alterEgo: (= gEgo ego) blocks: 0 y: 150)
I can't seem to find the equivalent for adding this part: (= ego egoObj) or is it (= gEgo ego) ?




13
SCI Syntax Help / Re: SCI0: Varibles and changestates
« on: November 28, 2024, 05:46:41 PM »
Have you fixed those things I pointed out with your variable declarations? Because those could result in memory corruption if you got them to compile somehow. If this is not a corruption bug, we'd need to see one or both room init methods.

I removed the ones that we not valid and I'm only using:
Code: [Select]
(local
    messageCount
passwd = 1 ;this is the password variable used for the Ken sent me password in the Door_script.
)

The init for Lefty's bar has:

Code: [Select]
(script# 102)
(include sci.sh)
(include game.sh)
(use main)
(use controls)
(use cycle)
(use game)
(use feature)
(use obj)
(use inv)
(use door)
(use rm797) ;showState debugging changestates script

(public
rm102 0
)
(procedure (GetInput str maxLen prompt &tmp [temp0 4]) ;The GetInput procedure. Does not seem to load form Main.sc. Noting that 97 to 122 are 'a' to 'z', and 97-32='A'.
(if (Print (if (>= argc 3) prompt else {}) #edit str maxLen &rest)
(StrLen str)
)
)
(procedure (toUpper &tmp i ch) ; This procedure turns all text into caps when using toUpper and GetInput statements.
(for ((= i 0)) (= ch (StrAt @passwd i)) ((++ i))
(if (and (>= ch 97) (<= ch 122))
(StrAt @passwd i (- ch 32))
)
)
)

(enum ;** Pimp state values
OpenHole
AskForPasswd
GotPasswd
)
(local
    messageCount
passwd = 1 ;this is the password variable used for the Ken sent me password in the Door_script.
)

(define LEFTY_LEFT 150)
(define LEFTY_RIGHT 243)
(define LEFTY_CENTRE 192)
(define LEFTY_Y 109)

(define vRoom 102
)
(define lPicture 0)
(define lDoor 1)
(define lFan 2)
(define lJukebox 3)
(define lPerson 4)
(define lPerson1 5)
(define lPerson2 6)
(define lPerson3 7)
(define lPeepHole 8)


(instance rm102 of Rm
(properties
picture 102
north 0
east 0
south 0
west 0
)

(method (init)
(super init:)
(self setScript: RoomScript)
(switch gPreviousRoomNumber
)
(cond
((== gPreviousRoomNumber 101) (gEgo posn: 86 128 loop: 2)
)
((== gPreviousRoomNumber 103) (gEgo posn: 286 168 loop: 1)
)
(else
(gEgo posn: 155 170 loop: 3)
)
)
(SetUpEgo)
(gEgo init:)
(aPicture init:)
(aFan init:)
(aJukebox init:)
(aPerson init:)
(aPerson1 init:)
(aPerson2 init:)
(aPerson3 init:)
(aLefty init:)
(aPeepHole init:)
(if (== gPreviousRoomNumber 103) (aDoor init: close:) ;this checks to see where ego has come from and if come from room 103 it will then close the door after
else
(aDoor init:)
)
)
)

And outside Lefty's where it crashes:

Code: [Select]
(script# 106)
(include sci.sh)
(include game.sh)
(use main)
(use controls)
(use cycle)
(use game)
;(use AutoDoor)
(use feature)
(use obj)
(use inv)
(use door)
;(use jump)
;(use dpath)
(use Sound)

(public
rm106 0
)

(define vRoom 106
)
(define lSign 0)
(define lSign2 1)
(define lSign3 2)
(define lDoor   3)


(instance rm106 of Rm
(properties
picture 106
north 102
east 108
south 0
west 107
)

(method (init)
(super init:)
(SetDebug) ;This forced game into debug.
(self setScript: RoomScript)
(switch gPreviousRoomNumber
)
(cond
((== gPreviousRoomNumber 105) (gEgo posn: 283 152 loop: 2)
)
((== gPreviousRoomNumber 102) (gEgo posn: 134 158 loop: 2)
)
((== gPreviousRoomNumber 107) (gEgo posn: 12 166 loop: 0)
)
((== gPreviousRoomNumber 108) (gEgo posn: 309 165 loop: 1)
)
  (else
(gEgo posn: 134 162 loop: 2)

)
)
(SetUpEgo)
(gEgo init:)(gEgo view: 705)
;(aSign init:)
(aSign2 init:)
(aSign3 init:)
(aSign4 init:)
(if (== gPreviousRoomNumber 102) (aDoor init: close:)
else
(aDoor init:)
)
)
)

14
SCI Syntax Help / Re: SCI0: Varibles and changestates
« on: November 28, 2024, 09:36:36 AM »
After implementing the super-dupper "peephole" script I'm now getting some oddities.

When ego runs the "peephole" script and leaves that room and comes back in, then when trying to exit either to the north (Hall) or south (outside Lefty's) I get the following lock ups. This only seems to happen if the peephole script has initiated. If not initiated both exits work as they should do.

Code: [Select]
(instance aDoorScript of Script ;Peep hole script
(properties)
(method (handleEvent event)
(if (or (!= (event type:) evSAID) (event claimed:))
(return)
)
)

(method (changeState newState)
(ShowState self newState 1 2)
(switch (= state newState)
      (OpenHole ; Peep hole door opens
      (ProgramControl)
  (aPeepHole cycleSpeed: 1 setLoop: 8 setCycle: End self)
)
(AskForPasswd ;The pimp speaks to ego
(Print 102 1) ;"Yeah. Whatsda passwoid?"
(PlayerControl)
(GetInput @passwd 45 {"Whatsda passwoid?"})(toUpper)
(if (== STRINGS_EQUAL (StrCmp @passwd "KEN SENT ME")
)
(self changeState: GotPasswd)
else
(Print 102 4) ;"Scram, dog breath!"
(aPeepHole setCel: 0 stopUpd:)
(self dispose:)
)
)

(GotPasswd ;Got password speak friend and enter.
(gGame changeScore: 5)
(Print 102 5) ;"Come on in."
(aPeepHole setCel: 0 stopUpd:)
;(aDoor open:)
;(self dispose:)
(gRoom newRoom: 103)

)
)
)
)

15
SCI Syntax Help / Re: SCI0: Varibles and changestates
« on: November 26, 2024, 04:24:08 PM »
Amazing. Thanks guys. This seems to do the trick forcing it all to caps. :)

Code: [Select]
(method (changeState newState)
(ShowState self newState 1 2)
(switch (= state newState)
      (OpenHole ; Peep hole door opens
      ;(ProgramControl)
  (= peephole_open 0)
  (aPeepHole cycleSpeed: 1 setLoop: 8 setCycle: End self)
)
(AskForPasswd ;The pimp speaks to ego
(= seconds 20)
(Print 102 1) ;"Yeah. Whatsda passwoid?"
(GetInput @passwd 45 {Whatsda passwoid?})(toUpper)
(if (== STRINGS_EQUAL (StrCmp @passwd "KEN SENT ME")
)
(self changeState: GotPasswd)
else
(Print {Scram Butthead})
(aPeepHole setCel: 0 stopUpd:)
)
)

Pages: [1] 2 3 ... 8

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

Page created in 0.036 seconds with 20 queries.