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 - MusicallyInspired

Pages: 1 ... 102 103 [104] 105 106 ... 117
1546
SCI Syntax Help / Re: Is my game corrupt?
« on: August 25, 2010, 02:45:19 PM »
Hmm, actually that second room had some Instances at the bottom that weren't being used yet so I just deleted them from the code snippet I posted. When I actually commented them out the room loaded fine. Soon as I put them back in the game crashes again. Even if I do something with them in the script. Any idea why that would happen?

EDIT: I tried compiling the same script in SCI Studio and the game runs flawlessly. It must be an issue with SCI Companion. The first one I've ever run into.

1547
SCI Syntax Help / Is my game corrupt?
« on: August 25, 2010, 02:19:02 PM »
This game I'm working on crashes consistently when making a seemingly routine switch to a new title screen room after the initial logo screen. I ran it in debug mode and this is what it gives me:




And it seems to be random every time depending on if I skip the sequence with enter, skip it with escape, or let it play through:





Here are the scripts for the previous room and the room it crashes on when it switches:

Code: [Select]
(include "sci.sh")
(include "game.sh")
(use "main")
(use "game")
(use "menubar")
(use "obj")
(use "cycle")
(use "user")
(use "controls")
(use "feature")
(script TITLESCREEN_SCRIPT)

(instance TitleScreen of Rm
    (properties
        picture scriptNumber
    )
    (method (init)
        ProgramControl()
        = gProgramControl FALSE
        (send gGame:setSpeed(7))
        (SL:disable())
        (TheMenuBar:hide())
        (super:init())
        (self:setScript(RoomScript))
        (Animate((DrawPic(800 dpOPEN_CENTEREDGE))))
        (send gEgo:init() hide())
        (send gTheMusic:prevSignal(0) stop() number(0) loop(0) play())
        (Wolf:init() setLoop(0) hide())
    )


)
(instance RoomScript of Script
    (properties)
    (method (changeState newState)
        = state newState
        (switch ((state))
            (case0
                (= cycles 1)
                ProgramControl()
                = gProgramControl TRUE
            )
            (case1
                = cycles 1
                (send gGame:setCursor(997 0))
            )
            (case2
                = seconds 6
            )
            (case3
                (Wolf:show() setCycle(Fwd) setMotion(MoveTo 215 156 RoomScript))
            )
            (case4
                = cycles 30
                (Wolf:setLoop(1) setCel(0) cycleSpeed(1) setCycle(End))
            )
            (case5
                = cycles 15
                (Wolf:dispose())
                DrawPic(801 dpOPEN_TOP dpCLEAR gDefaultPalette)
                (Moon:init())
            )
            (case6
                = cycles 10
                (Moon:setCycle(End))
            )
            (case7
                = seconds 2
                (Infamous:init())
            )
            (case8
                = seconds 4
                (Adventures:init())
            )
            (case9
                = seconds 1
                (Infamous:dispose())
                (Adventures:dispose())
            )
            (case10
                (Moon:setLoop(0) setCel(4) setCycle(Beg RoomScript))
            )
            (case11
                = cycles 10
                (Moon:dispose())
            )
            (case12
                (send gGame:newRoom(803))
            )
        )
    )


    (method (doit)
        (super:doit())
    )


    (method (handleEvent pEvent)
        (super:handleEvent(pEvent))
        (if (== (send pEvent:type) evKEYBOARD)
            (switch ((send pEvent:message))
                (caseKEY_ESCAPE
                    (send gTheMusic:fade())
                    (send gGame:newRoom(803))
                )
                (caseKEY_RETURN
                    (send gTheMusic:fade())
                    (send gGame:newRoom(803))
                )
            )
        )
    )


)
(instance Wolf of Act
    (properties
        view 903
        x 310
        y 156
        loop 0
        cycleSpeed 0
    )
)
(instance Moon of Prop
    (properties
        x 160
        y 60
        view 900
        loop 1
        cel 0
        cycleSpeed 0
    )
)
(instance Infamous of Prop
    (properties
        x 160
        y 146
        view 901
    )
)
(instance Adventures of Prop
    (properties
        x 160
        y 178
        view 902
    )
)

The room it crashes on upon loading:

Code: [Select]
(include "sci.sh")
(include "game.sh")
(use "Controls")
(use "Cycle")
(use "Door")
(use "Feature")
(use "Game")
(use "Inv")
(use "Main")
(use "Obj")
(script 803)
(local dGrahamYolk = 0 )
(local dFortuneYolk = 0 )


(instance rm803 of Rm
    (properties
        picture scriptNumber
        north 0
        east 0
        south 0
        west 0
    )
    (method (init)
        (super:init())
        (self:setScript(RoomScript))
        (switch ((gPreviousRoomNumber))
            (default
                (Animate((DrawPic(803 dpOPEN_CENTEREDGE))))
            )
        )
        (send gEgo:init() hide())
    )


)
(instance RoomScript of Script
    (properties)
    (method (doit)
        (super:doit())
    )


    (method (handleEvent pEvent)
        (super:handleEvent(pEvent))
        (if (== (send pEvent:type) evKEYBOARD)
            (switch ((send pEvent:message))
            )
        )
    )


    (method (changeState newState)
        (= state newState)
        (switch ((newState))
            (case0
                (= cycles 1)
                ProgramControl()
                = gProgramControl TRUE
            )
            (case1
                = cycles 1
                (send gGame:setCursor(999 0))
            )
            (case2
                = seconds 2
            )
            (case21
                (send gGame:newRoom(802))
            )
        )
    )


)

1548
SCI Syntax Help / The Toggle Sound Issue (F2)
« on: August 24, 2010, 11:36:53 PM »
So in the Template Game, toggling sound is broken and has been since day one. Since barely anybody really pays much attention to sound support in SCI games I doubt anyone's noticed. But when you disable sound (whether with F2 or the menubar) you can never enable it again. I'm not sure why, but I'm looking into it. Perhaps a new set of eyes would reveal something I'm not seeing.

1549
SCI Syntax Help / Re: Question re: SCI Studio Help code snippet
« on: August 24, 2010, 11:31:37 PM »
I think it's the string which defines an inventory object when you try to interact with it with the parser. So "look gem" and "look glowing gem" will function. Otherwise it won't work (which it doesn't for any of my current inventory items in KQ2SCI). Also, Inventory items are somehow tied to props which can be on the screen. The way Brian did it (or Sierra?) was that a player could drop an inventory object and it would appear on screen. So there might be some kind of shared script stuff there....as opposed to the natural way I'd look at it as completely separate bits of code that look like they belong together to the player.

I don't know if I'm making any sense.

A little snip from the SCI Studio help file regarding the InvI class:

Quote
bool saidMe()
Returns TRUE is the user's input "Said" the name of the inventory item. Otherwise, FALSE.
 

This doesn't seem to work in the template game even if the said property is defined.

1550
SCI Syntax Help / Re: Question re: SCI Studio Help code snippet
« on: August 23, 2010, 12:25:56 PM »
Hey! Maybe that has something to do with the said words in the Inv script for each inventory obeject that didn't ever seem to do anything! You can't just type "look at gem" if you have it in your inventory. You have to actually open your inventory window and select it to look at it. I was going to program a bunch of global said statement procedures to get it to work.

Brian! Why didn't you document these things????

1551
SCI Syntax Help / Re: How to use Qualifying Adjectives with the parser?
« on: August 21, 2010, 11:10:42 PM »
you can't "take" it but you do "buy" it from Fester's store. And on a recent playthrough test for ScummVM I did indeed type "buy orat on a stick" and it worked.

1552
SCI Syntax Help / Re: Disabling Save/Restore
« on: August 20, 2010, 01:24:39 PM »
Never mind, I've figured it out. You have to go to the Game header file (game.sh) and renumber the menu functions there. This'll be handy for others who can't figure it out...

1553
SCI Syntax Help / Re: Disabling Save/Restore
« on: August 20, 2010, 01:10:49 PM »
I managed to successfully remove the Save/Restore functions by removing EVERY reference to Save and Restore from the menubar class but now Quit doesn't work. I believe it's because between Save/Restore and Quit in the menubar there is a separator that obviously isn't supposed to do anything and it's assigning Quit's functions to that control...which is nothing. Anyway, I can't figure out how to make Quit work while Save/Restore is disabled.

1554
SCI Syntax Help / Disabling Save/Restore
« on: August 20, 2010, 12:45:03 PM »
How would I go about disabling the Save and Restore functions? I removed them from the menubar class but then it screws up the shortcut keys for some reason. CTRL+Q brings up the Save dialog and F7 brings up Restart Game or something. I think I remember succeeding before I just don't remember....any ideas? I mean disable Save/Restore for an entire game not just a certain section. I'm working on a new project and it's very short so it doesn't need Save/Restore.

1555
SCI Syntax Help / Re: How to use Qualifying Adjectives with the parser?
« on: August 20, 2010, 11:12:02 AM »
Why is the word 'of' in the vocab then? It also seems silly that (once again) the SCI engine is incapable of something AGI did with ease.

Also, In King's Quest I SCI you can type "get four leaf clover" and it will work. There's no prepositions, but it's there. I'll look for other examples as well.

1556
SCI Syntax Help / Re: How to use Qualifying Adjectives with the parser?
« on: August 19, 2010, 12:49:44 PM »
Then you'd basically be saying "take basket basket" in-game which would return an error. And, in your example, words in brackets are just a collected series of "ORs". It doesn't acknowledge both of them at the same time. At any rate, I tried it and it fails.

I just wish Brian would have documented the parser a lot more than he did. He basically through a simple tutorial together and expected everyone else to understand it. In fact, he had that attitude for almost everything script related. Not everyone's a natural programmer...maybe that's why SCI Studio never really garnered much attention.

As a side note, it's nice to have active members tackling problems again. Feels like 3 years ago again :).

1557
SCI Syntax Help / Re: How to use Qualifying Adjectives with the parser?
« on: August 19, 2010, 12:23:52 PM »
Oh I should have mentioned that I put my 'take/key' logic after the 'take/key<gold' and 'take/key<silver'.

Ah! That did it! :) Thanks for figuring this out. Why this stuff isn't properly documented I'll never know....this should go in the How To tutorial thread.

Unfortunately, I can't figure out how to use this for stuff like "basket of goodies". I can make it work with "take goodies basket" in-game but "take basket of goodies" isn't recognized....I thought the parser was smart enough to figure this stuff out.

1558
SCI Syntax Help / Re: How to use Qualifying Adjectives with the parser?
« on: August 19, 2010, 10:44:59 AM »
Didn't work for me. Even though I had take/key<gold and take/key<silver after take/key it still decided to ignore both of them and gave me the take/key description.

1559
SCI Syntax Help / Re: How to use Qualifying Adjectives with the parser?
« on: August 18, 2010, 11:50:51 PM »
Thank you! I will test this!

1560
SCI Syntax Help / Re: How to use Qualifying Adjectives with the parser?
« on: August 18, 2010, 01:34:49 AM »
I'm starting to think that the parser interface in the SCI template game is unfinished. Other Sierra games have no problem using adjectives. The function is even there in SCI Studio/Companion, but there is no explanation as to how to use it!

Pages: 1 ... 102 103 [104] 105 106 ... 117

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

Page created in 0.043 seconds with 20 queries.