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

Pages: 1 ... 3 4 [5] 6
Just to note, ran all through my other rooms and found there is another room with similar behavior on the south wall only; however, with this room, it happens regardless of which entry I use.  The south wall/control is just ignored, even if I do come in from the south.

The only other two rooms I currently have with south entries work as expected, though both of those only have the south entrance (and the first is the opening room).

Still haven't figured out the reason for this yet, though.

Hi again,

This may not quite be a syntax question, but I'm encountering a problem with the white control line in one of my rooms.  Previously, I'd had just a very rough mock up of the rooms, and all control lines seemed to work fine.

The past couple of weeks, I've buckled down and started working on actual backgrounds.  All's been great here until working on one outside scene today.  After coming up with an improved-but-still-rough start where I could place the entries (player can go west, south, or in a building on the screen), I went ahead and created control lines to cage the ego in and open passage where desired.

Testing it out, I've found that the south white control line only seems to apply when the player is coming from the south room; that is, if I come from the east or out of the building, the user can skip right over the white line and end up in the south room through any point on the lower end of the screen.  If, on the other hand, the player has just come from the south room, the white line applies and properly keeps the user confined to the room unless the entry area is used.  All of the other lines in this room seem to work as expected regardless of the entry point; it's just this one wall that fails anytime the user comes from one of the other two rooms.

The entry code is identical for all entry points other than positions and loops:

Code: [Select]
(switch gPreviousRoomNumber
  (gEgo posn: 230 142 loop: 2)
  (gEgo posn: 25 148 loop: 0)
  (gEgo posn: 198 185 loop: 3)
(gEgo posn: 150 130 loop: 1)

and the exit code is similarly plain:

Code: [Select]
(method (doit)
(super doit:)
(if (& ctlCYAN (gEgo onControl:))
(gRoom newRoom: 7)
(if (& ctlFUCHSIA (gEgo onControl:))
(gRoom newRoom: 5)
(if (& ctlYELLOW (gEgo onControl:))
(gRoom newRoom: 6)

I'm pretty puzzled what the issue could be.  I've redrawn the control lines a few times in a few different positions, but I'm finding the same behavior regardless.  Any ideas what I could be doing wrong here?

SCI Syntax Help / Re: Customized Dialogue Windows
« on: March 07, 2019, 08:43:35 AM »
Nice, Kawa, thank you.  I'd fixed a workaround by just created intermediate procedures for each character that change gWndColor and gBackColor, pass the params onto Print() proper, then revert the color changes, but I'm going to take a closer look at sysWindow and how these games did things to execute it a bit more properly.

This one's SC10, so I don't think the Talker is an option yet; I hadn't realized it had already been implemented for QFG2, though I think I vaguely recall reading that was the first SC11 game?  Which would make sense.  Is it the only SC11 parser/EGA only game Sierra produced?  Also, I could just be inventing memories; that's a thing that sometimes happens.

SCI Syntax Help / Customized Dialogue Windows
« on: February 15, 2019, 10:56:08 AM »
Hi again.  Most of the code for the demo is done (act 1 of a 3 act game).  Still a ton to do, replace edited Sierra backgrounds with original ones, add and pretty up some views, clean up some code (aside from a bit of scripting and the C++ courses I took in high school 20 years ago, I'm not a programmer), and waaaaay too many "responseless" possibilities.  Still, there are two complete positive paths through the end of the section I have, it's been amazingly rewarding, and thank you so much for the help with my absolute beginner's questions.

One thing that isn't necessary, but I'd love to include, and I realize it may require a ton of rewrites or additions, is customized dialogue boxes for conversation, similar to QfG2.  Basically just background and text colors customized depending on who's speaking.  Snail Trek (love it and looking forward to Cascadia Quest) also has something very similar; I don't know that speech bubbles would fit stylistically here, but it is basically that idea.

I've looked at the code and guess what's there can be used to implement this, but as a non-coder, my method for doing so would probably be super convoluted.  Is there any kind of built-in method for the customization of dialogue boxes, or a sample of code that doesn't suck for doing so?  I can certainly add sucky code, but I know many of you have been here for a long time doing these things, so figured I'd ask before tromping ahead recklessly.  :D  Thanks!

SCI Syntax Help / Re: Instance Priorities
« on: February 15, 2019, 03:32:22 AM »
Thanks Troflip and everyone.  setpri did do what I needed.  It seems a bit odd to me that a specified priority in the instance code would be overwritten, but that makes sense, and setpri totally does what's needed here.  To follow up, does setting priority: during instantiation do anything, or is it always just overwritten by the y value?

SCI Syntax Help / Re: Instance Priorities
« on: February 06, 2019, 03:56:03 PM »
Thanks all, I haven't had the opportunity yet to work with the priorities yet, but it's enlightening info.  I'm still curious, as I've tried all sorts of relative priority numbers on two items and haven't found that their relative visibility one-over-the-other is affected, which sounds like it should be the case.  Still seems to default to the y default, from what I can tell based off reading this.  When I get the chance to monkey with it some more, though, I'll take Iskovlun's suggestion and post some code here if things still seem askew from my understanding after reading through here.

SCI Syntax Help / Instance Priorities
« on: February 02, 2019, 07:00:00 PM »
I've got another question for you fine folks here about instance priorities.  Basically, I'm not sure how they work to layer instances in a desired manner.

For example, in one of my rooms, the player can open a dresser, which brings up an instance of the openDresser visually on the screen.  No problem there.  Now say the player moves or looks under the clothes.  I switch to a new loop where the clothes are shifted to show the bottom of the drawer, and there's supposed to be a book sitting there.  Functionally, in fact, there is!  But visually, I cannot get the book to appear overtop the dresser instance.  It's initialized but hidden by default; when the clothing is moved, I call show: on it, but no book.

If the drawer's closed and the openDresser instance isn't there, the book shows without issue if I call for it.

I know that instances have Priority properties, and I've imagined this should take control of the layering, but it doesn't seem to matter what I put here; whether the book is a higher priority that the openDresser or a lower, it's just not showing up.

I've seen some similar behavior in other rooms where a couple of instances are stacked on each other; it seems they just appear in some mix of the order they're initialized and displayed in.

Am I off in thinking the instance Priority can be used to direct instance placement relative to one another?  Is this property only applicable to background/Pic priorities?  Is there some other way to prioritizing instances to direct where they show relative to each other?

I know in the above instance I could just add another loop with the book, so it's not like there aren't workarounds, but I'd really like to know if my expectation is off or I'm bungling it up somehow, just so I get it.  Thanks again in advance.

SCI Syntax Help / Re: Unlocking Locales and Regions
« on: January 31, 2019, 09:57:06 AM »
Thank you, gumby, I just tested it out and it appears to do exactly that in this case.  Way nicer than a c&p would have been!

SCI Syntax Help / Re: Unlocking Locales and Regions
« on: January 30, 2019, 09:04:17 PM »
I've definitely give that debug -d param a look into, that'll be a definite timesaver with some of these "Oops" type messages.

A follow-up on locales and regions...  I've got it working now, and I know that the hierarchy is room response to a statement, then locale response if room response isn't defined.

Is there a way to bypass the room response, if I want to use the locale's response code within part of an 'if' statement without copying and pasting the whole deal?  So basically, in response to a 'Said':

Code: [Select]
(if a
  (do this set of things defined in the room script)
  (perform the locale code for this 'Said')

Without the 'else,' there's just no response, since it considers itself done once the 'if' returns false.  I can copy and paste into the room code if necessary, just thinking there's probably a way to hand up the chain to save on heap for larger chunks?

SCI Syntax Help / Re: Unlocking Locales and Regions
« on: January 30, 2019, 10:42:44 AM »
Thank you again, Troflip, that was absolutely it.  I'll be sure to keep that in mind.

SCI Syntax Help / Unlocking Locales and Regions
« on: January 29, 2019, 07:21:45 PM »
Hi again!

As the title suggests, I'm trying to incorporate locales and/or regions in some of my scripts, but I seem to be running into an error; it compiles and the game runs up until the room is loaded, as which point I get the "Oops!" error and a crash.  I've read over the tutorial at and things look right to me, but I must be missing something.

I've placed the script alias in

Code: [Select]
and have set up a basic test script:

Code: [Select]
;;; Sierra Script 1.0 - (do not remove this comment)
; SCI Template Game
; By Brian Provinciano
; ******************************************************************************
; Lieven Locale Script

(include "")
(include "")
(use "controls")
(use "game")
(use "main")
(use "obj")
(instance Lieven of Locale
    (method (handleEvent pEvent)
        (super handleEvent: pEvent)
(if (Said 'smell/hands') (Print 1 7))

Finally, I've set it in the room:

Code: [Select]
(instance rm001 of Rm
picture scriptNumber
north 0
east 0
south 0
west 0

(method (init)
(super init:)
(self setLocales: LIEVENLOCALE_SCRIPT)
(gEgo posn: 150 147 loop: 1 cel: 0)
(SetUpEgo 1 6)
                … etc etc

But no luck yet.  I also tried setting everything as a region with the same result.  Can someone help me see what I'm missing with this?  Thanks in advance.

Thanks guys, that's much neater and works like a charm.  Another question about cutscenes; I disabled user input during this one, but is there a way to still listen so that if the player hits for example 'x' or some other control key (I may allow for looking during other cutscenes) I can let them break the switch to skip the cutscene?

Another question for the SCI gurus, I'm using a switch state to move along an automated scene (perhaps there's a better way to do this, I'm all ears for sure).

Currently, I have the following set up within it.

   (theMessenger posn: 155 160)
               (= seconds 1)
   (theMessenger setCycle: Walk setMotion: MoveTo 155 157)
   (= cycles 1)
   (theMessenger loop: 0 setMotion: MoveTo 205 143)
   (= seconds 2)
   (theMessenger loop: 1 cel: 0)
   (= seconds 2)

This works okay, but I'd like to cut out the waiting periods between the states, if possible.  Two issues I'm seeing with this:
    • Setting cycles or seconds to 0 just seems to stop everything entirely, rather than skipping over the waiting period.
    • If I set #4 to something low like 1 cycle, the loop updates even though the movement is still going on, I'm guessing because MoveTo waits for an ok call while loop doesn't.

    So it works, but I have awkward halts between movements and am sure there must be a better way to do this then figuring out the animation cycles required to wait before travel is complete to change loops.

    Is there some alternative to seconds and cycles that waits for the commands to fully be carried out in each state and all called methods to get the ok when necessary, then immediately moves on to the next state?  Or is there another way to do this?  Is a switch state not even the best option?

    Also, while I'm asking, if I'm working an SCI0 parser, it looks like there's no Path Motion method; is the best way to make multiple MoveTo calls like above, or is there some other way to direct a multi-step path?

    Thanks in advance!  Trying to figure things out on my own the best I can, but occasionally getting caught up between the two different scripts, various versions of SCI, and limited documentation.[/list]

    Sounds good, thanks.  I think I'll still try to avoid it, but just wanted to check if I do resort to it what to expect.

    The SCI Companion doc notes that:

    "Both languages can be mixed and matched in the same project (but not the same file), though it is not recommended you do so (but this might be the case if you are converting an old project to the Sierra Script syntax file-by-file)."

    This makes sense, and ultimately I'm shifting everything I'm gathering to Sierra Script, which is my project's overall pref/setting (been working on this with some scripts already, and even just translating from one script to the other is tightening up my grip on the syntax substantially), but it made me curious whether there are specific known risks in mixing/matching the two script types within a single project?  Do certain elements fail to work across them very well?  Or is this not recommended mainly because it just results in more muddled code than we'd want?

    Pages: 1 ... 3 4 [5] 6

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

    Page created in 0.049 seconds with 20 queries.