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.


Topics - Doan Sephim

Pages: 1 [2] 3 4 ... 7
16
SCI Syntax Help / Parser confusion
« on: November 11, 2022, 11:48:02 AM »
I'm trying to write a parser command that will read if the player types either
ask about NOUN
or
ask man about NOUN
This easily works for ask about:
Code: [Select]
(if (Said '(ask<about)>')
(if (Said '/NOUN')
(Print 2 25) ; default statement
)
But I'm having trouble with ask man about...
Something like this kind of works:
Code: [Select]
(if (Said '(ask<about)/man/NOUN')It does allow me to ask NOUN about man which is a little weird, but not too bothersome.
But when I try to this:
Code: [Select]
(if (Said '(ask<about)/man>
(if (Said 'NOUN')
It doesn't work.
I've tried something like:
Code: [Select]
(if (Said '(ask<about)[/man]>')
(if (Said '/NOUN')
(Print 2 25) ; default statement
)
But the parser doesn't like this at all.

Does anyone have any thoughts?

17
I'm not sure where the escape button is bound to the Menubar in the SCI but I'd like to be able to turn that off for the intro to my game and allow the ESC button use for skipping the intro.

I looked in the Menubar and controls script, but I'm not sure I found it. Anyone know where in the template game the ESC button is linked to the menubar?

18
SCI Syntax Help / SCI0 [SOLVED] - Menubar with changing options
« on: October 07, 2022, 12:19:49 PM »
I am trying to do one of two things and can't quite get either to work:
1. I am trying to make it so a cretain menu option either shows or doesn't based on a global variable. I have tried something like this, but doesn't seem to work:
Code: [Select]
(if aGlobalVariable
(AddMenu
{ Character -}
{Ask About`^a:Retype`#3:--!:Inventory`^I:Death Log`^d:Notes`^n:Switch`^x}
)
else
(AddMenu
{ Character -}
{Ask About`^a:Retype`#3:--!:Inventory`^I:Death Log`^d:Notes`^n}
)
)
It always gives me the AddMenu without the variable. So is there a command to update the menubar that I need to also do when I change the variable?

- or -
2. Can I show the option in the menubar at all times, but have the option "greyed" out and inactive unless the variable is true. This one I have no idea about at all, but just thought I'd ask anyway. I'd be happy to get either option running.
Thanks

19
SCI Syntax Help / [Solved] SCI0 How to "look at" Inventory Items?
« on: June 12, 2022, 11:22:17 PM »
Here's my problem:
When the player types "look at widget," how do I open that item [the widget] as if from the inventory menu? I've looked at the Inv script as well as the following bit of code from ErikorOakford's SCI0 template:
Code: [Select]
((Said 'look[<at]>')
(cond
;look at inventory items
((= i (inventory saidMe:))
(if (i ownedBy: ego)
(i showSelf:)
else
(DontHave)
)
)
But I've been unable to produce anything beyond opening up the menu with all the items listed by using the same command as in the menubar:
Code: [Select]
(gInv showSelf: gEgo) That's nice and all, but I'd like to zero in on the particular item "looked" at by the plater.
Erik's script looks like it should work (and I'm sure it does in his template), but I'm using the standard template, and even correcting for a few differences in naming conventions, I'm still not returning anything that runs.
I know it's actually a fairly simple command, something already there in the template, I'm just not fitting the pieces together and need a hand.
Thanks.

20
SCI Syntax Help / SCI0 - gEgo and barriers
« on: May 25, 2022, 09:26:10 AM »
Does anyone know where to look to find the programming controlling when gEgo hits a barrier? I find it curious that when gEgo hits a barrier and stops that the command to continue in that direction (say if the barrier is removed) is still active. I would think that movement would be set to null upon hitting a barrier and I'd like to implement this.

So, can anyone point me in the right direction and/or explain any potential problems of implementing such a change/

21
SCI Syntax Help / [SOLVED] SCI0 - Globalizing my local death sheet Script
« on: February 20, 2022, 02:25:28 PM »
Last year, inspired by Charles "retry/restore/quit" thread, I put together a death window to show the various deaths the player has suffered in the game to the current point. I had to do a lot of things differently, such as saving variables to an external file so that restoring doesn't remove them, to make this possible.

I've put together a bare bones script in a random room's script to test getting it up and running, but now I need to make it global so that the sheet can be accessed anytime (preferably in the menubar). Here's where the problem presents itself - while migrating the code to the main script, I can get everything up and running except the ability to remove the window. I think the problem may rest with my use of the Display command, but I'm not 100% certain.

My question is should I try to make a new script for this (and how), or does it belong in an existing script (Window, User), or is the Main script a fine place for and there are just some bugs? And finally, should I not be using "display" at all and keep it all a "Print" command? If that's the case, how do I argue how to print some things and not others in a Print? Perhaps FormatPrint first?

Here is how it presented in the Roomscript:
Code: [Select]
;;; Sierra Script 1.0 - (do not remove this comment)
; Broken Bridge Forest
(script# 210)
(include sci.sh)
(include game.sh)
(use controls)
(use cycle)
(use feature)
(use game)
(use inv)
(use main)
(use obj)
(use window)
(use menubar)

(public
rm210 0
)

(local
deathWindowOpen = 0 ; Used as a switch to determine when you can close the deathWindow
deathWindow ; Used to open the display window
i = 0 ; Used in the "for"
textDown = 7 ; Used to place statements progressively lower than earlier statements
textRight = 20 ; Used to move statements right, once y-axis full - NOT YET IMPLEMENTED
[str 30] ; String for pulling text resources
)

(instance rm210 of Rm
(properties
picture scriptNumber
north 0
east 211
south 0
west 215
)

(method (init)
(super init:)
(self
setScript: RoomScript
)
(switch gPreviousRoomNumber
(else
(gEgo init: posn: 32 96)
)
)
(SetUpEgo)

)
)

(instance RoomScript of Script
(properties)

(method (changeState mainState)
(= state mainState)

)

(method (handleEvent pEvent)
(super handleEvent: pEvent)

; removes the window AND dsiplay text! I'm not sure why it disposes the display though.
(if (== deathWindowOpen 1)
(DisposeWindow deathWindow)
(= deathWindowOpen 0)
(= textDown 7)
)
(if (== (pEvent type?) evMOUSEBUTTON)
)
(if(Said 'show/death')
(= deathWindowOpen 1)
(= deathWindow (NewWindow
0
0
190
318
{Death Count}
nwNORMAL
15 ; priority
7
15
))
; For loop to run through the gDeath array and print a statement of death for each that is true
(for ( (= i 0)) (< i 9)  ( (++ i)) (if (> [gDeaths i] 0)
(switch i
(0
(Display
(Format @str {You have died %u times:} [gDeaths 0])
dsCOORD 10 textDown
)
(= textDown (+ textDown 12))
)
(1
(deathCountIterator)
)
(2
(deathCountIterator)
)
(3
(deathCountIterator)
)
(4
(deathCountIterator)
)
(5
(deathCountIterator)
)
(6
(deathCountIterator)
)
(7
(deathCountIterator)
)
)
)
)
)
)
)

(procedure (deathCountIterator)
(Display
(Format @str 650 i)
dsCOORD 20 textDown
dsFONT 4
)
(= textDown (+ textDown 9))
)
Attached is how the window looks in the roomscript, and the termination command works just fine (but doesn't work well at all in the Main)

22
SCI Syntax Help / SCI0 - How to check if right-click on a control color?
« on: January 04, 2022, 02:04:29 PM »
I've actually never done this before. I've only verified for clicking within a box or on a view's box dimensions.
I tried something like:
Code: [Select]
(method (handleEvent pEvent)
(super handleEvent: pEvent)
(if (== (pEvent type?) evMOUSEBUTTON)
(if (& (pEvent modifiers?) emRIGHT_BUTTON)
(if (== pEvent ctlFUCHSIA)

But that doesn't return true

I also tried
Code: [Select]
(if (pEvent onControl: ctlFUCHSIA)and
Code: [Select]
(if (== (pEvent onControl: ctlFUCHSIA) TRUE)But both crash the game because I clearly don't know the proper syntax for this.

I know a lot of this is common knowledge for people who have looked through decompiled scripts, but every time I've tried that, I end up more confused than ever!

23
SCI Syntax Help / SCI0 - Pic Size Maximum?
« on: December 09, 2021, 09:15:52 PM »
A friend of mine did a rework of an image for Betrayed Alliance Book 1, but he's using Photoshop. When I converted the image into SCI0, its size clocked in at 43 MB.

I wonder, is there a maximum size for these resources and if, so, how close am I to it (as I'll still need to add Priority and Control lines).

24
SCI Syntax Help / xStep, yStep and the edge of the screen
« on: December 03, 2021, 09:26:44 PM »
I'm having an issue with actors moving at certain x or y steps not hitting edge of screens or triggering thin control lines.

Most of this I can work around without too much difficulty, but my character running speed is xStep 5 and the fact that the character isn't triggering the edge of screen room change is becoming a problem.

Has anyone else had this issue and/or know an easy solution?

I am a little confused on how I didn't have this issue with Betrayed Alliance Book 1, which uses the same character sprite and xStep running speed.  :o

25
SCI Syntax Help / [Solved] changeState question
« on: December 01, 2021, 01:58:07 PM »
If I have a state set to run for so many cycles then move to the next state, is there a way to nullify that if I manually change to a different state in the same script. I feel like this is a very simple thing, but I don't know how to do it.

26
SCI Syntax Help / SCI0 - Text window vanishing cutouts of Views
« on: September 10, 2021, 01:00:11 PM »
Does anyone know why this happens? This particular text box reveals a "hidden" area behind a breakable wall.

This isn't a super high priority as I can just move the location of the text box, but this is an issue I don't think I've ever seen anyone talk about before.

27
SCI Syntax Help / SetMotion: End and animation hiccups
« on: July 17, 2021, 06:37:18 PM »
I have an animation that goes through various stages, so I have it scripted out in a changeState method.

I have the cycleSpeed set to 4, but when the animation reaches its final cel and moves on to the next state, the last cel lasts for only 1 game cycle before moving on to the next state.

This makes sense because it moves to the next state when it reaches the end because I told it to with SetCycle: End self.

Is there an elegant solution to this to make the last cel last for the full amount of gameCycles (according to what cycleSpeed is set at) before moving to the next state?

28
I understand how to "FormatPrint" to allow for variable values to be imbedding in a print command, but I'm not sure how to do that with the Inventory's "description." I looked in the Inv script and there's something about IconPrint in the showSelf method, but I confess, I'm a bit baffled.

29
SCI Syntax Help / SCI0 - Is the Template broken for togglesound?
« on: February 05, 2021, 02:21:44 PM »
I just noticed I can't seem to change the audio volume of the snd resources I'm using in the game and the menubar's toggle for sound doesn't seem to do anything (nor does the manual gauge for setting volume)

I'm using MT-32 as the SCI-synth in Companion and as the driver, if that matters.

30
SCI Syntax Help / SCI0 - Death Icon always set to loop indefinitely
« on: January 21, 2021, 09:42:20 PM »
I'd like to have some more flexibility with the death handler icon, if possible. It seems to be set to always cycle forward indefinitely.

Is there a way for me to just run the Cels ONCE, like you can do with setCycle: End.

The Method is here, but it's not clear to me how to allow a choice between cycling once or infinite:
Code: [Select]
(instance deadIcon of DCIcon
(properties)

(method (init)
(super init:)
(if (== gRoomNumberExit 540)
(= cycler (End new:))
(cycler init: self)
)
)
)

Pages: 1 [2] 3 4 ... 7

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

Page created in 0.044 seconds with 19 queries.