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 - Doan Sephim

Pages: 1 [2] 3 4 ... 44
16
SCI Syntax Help / Re: SCI0: right click to look like in QFG2
« on: March 18, 2024, 11:49:08 AM »
Here's what I do in Betrayed Alliance. It might not be the most efficient code, but it works for me well enough.
First I will make a procedure:
Code: [Select]
(procedure (checkEvent pEvent x1 x2 y1 y2)
(if
(and
(> (pEvent x?) x1)
(< (pEvent x?) x2)
(> (pEvent y?) y1)
(< (pEvent y?) y2)
)
(return TRUE)
else
(return FALSE)
)
)
I will reference this procedure in the handleEvent method in this way:
Code: [Select]
(if (== (pEvent type?) evMOUSEBUTTON)
(if (& (pEvent modifiers?) emRIGHT_BUTTON)
(if (checkEvent pEvent 92 123 65 117) ; clicked within the box of these coordinates
(PrintOther 18 6)
)
You can also reference the coordinates of a view this way:
Code: [Select]
(checkEvent pEvent (mapItem nsLeft?) (mapItem nsRight?) (mapItem nsTop?) (mapItem nsBottom?))
(PrintOther 18 24)
)
You can also check to see if the click happened on a control color:
Code: [Select]
(if
(== ctlGREY (OnControl ocSPECIAL (pEvent x?) (pEvent y?)))
(PrintOther 18 77)
)
Or on a priority color:
Code: [Select]
(if
(== ctlYELLOW (OnControl ocPRIORITY (pEvent x?) (pEvent y?)))
(PrintOther 18 78)
)
This is what works for me. Perhaps when I start a new project, I'll look into having something more global, but this does the trick for now,


17
SCI Syntax Help / Re: Parsing lone nouns
« on: February 02, 2024, 02:56:58 PM »
It appears the answer may just be '/somenoun', considering how Rumplestiltskin is implemented in KQ1.
Wow! Sometimes I feel SOOOOO dumb! That works easily. Thank you for the prompt answer.

18
SCI Syntax Help / [SOLVED] Parsing lone nouns
« on: February 02, 2024, 02:24:48 PM »
Does anyone know how to parse lone nouns without using a verb?

I want the player to be able to answer a question by just answering with a noun, but it gets caught up in a syntax error since it's not a complete command.

Thanks

19
SCI Syntax Help / Re: Is there no cond in Studio Script?
« on: July 15, 2023, 12:23:19 AM »
Did you use the conversion built into Companion? Probably a lot of work to fix what gets broken by it, but it might do a lot of the work for you.
Yes, I had tried that in the past but it was quite a lot of headache...too much for me at the time... probably too much work still. But now I'm feeling like I'm missing out on something important not being able to use cond to make this simple and elegant code for looking at inv items

20
SCI Syntax Help / Re: Is there no cond in Studio Script?
« on: July 14, 2023, 02:04:46 PM »
Ah, how regrettable...serves me right for never converting to Sierra Script!

21
SCI Syntax Help / Is there no cond in Studio Script?
« on: July 13, 2023, 07:22:27 PM »
Don't crucify me here! Yes, I'm coding Betrayed Alliance Book 1 is Studio Script, but only because the project is older than Sierra Script and the migration process would be more burdensome than it's worth. Don't worry, Book 2 is in Sierra Script!

All that said. I was trying to migrate the "look/item" from Book 2 into book 1 and hit a snag...apparently there is no "cond" conditional in Studio Script! Does anyone know if there is a functional alternative? I'm trying to migrate the following code over:
Code: [Select]
(if (Said 'look>')
(cond
((= i (gInv saidMe:))
(if (i ownedBy: gEgo)
(i showSelf:)
else
(PrintDontHaveIt)
)
)
)
)

22
SCI Syntax Help / Re: [SOLVED] SCI0 - Autosave
« on: July 12, 2023, 07:49:51 PM »
Does the change directory button in the restore dialog cause the same crash?
Yes it does...well, it did until I removed it

23
SCI Syntax Help / Re: [SOLVED] SCI0 - Autosave
« on: July 12, 2023, 07:07:00 PM »
Yeah, it sounds like removing that button is really just papering over a latent problem.
I agree, but it's the best available solution for now, and it's one that is easy to reverse if/when the time comes. It's also a very low cost to pay seeing as how I think it is very few people who even use that availability. Plus it does save ever so slightly on heap  ;D

24
SCI Syntax Help / Re: [SOLVED] SCI0 - Autosave
« on: July 12, 2023, 10:48:34 AM »
Thanks Kawa! With you pointing me to the correct script, I was able to remove the change directory stuff. Loses a touch of old school authenticity but I don't think anyone will mind. Also, can't crash the game if you can't push the button  ;D

25
SCI Syntax Help / Re: [SOLVED] SCI0 - Autosave
« on: July 12, 2023, 10:09:17 AM »
I have not tested with ScummVM, which I think uses it's own save system (but I'm no expert).

I want to make sure this is ironed out for people who want to play on era hardware, too. I think just removing the change directory will be my go to answer, which I thought would be easy enough, but I cannot even find WHERE that logic is!

26
SCI Syntax Help / Re: [SOLVED] SCI0 - Autosave
« on: July 11, 2023, 11:26:03 PM »
While the autosave feature does work as intended, it does have a side effect that I'm not sure how to best handle.

With the autosave code in, it has led to the "change directory" button in the "save game" window to cause a "oops! You tried something" error and crashes. Not sure how to fix that. If worse comes to worst, I could just delete the "change directory" button from the game. I think that would bother less than 1% of people.

Any ideas?

27
Mega Tokyo SCI Archive / Re:THE NEXT VERSION OF SCI
« on: October 23, 2004, 04:32:15 PM »
Brian has made it quite clear - if we made more games with the current studio, he'd have much more motivation to work on it...so in reality if it is delayed in coming, we have to blame ourselves for not taking advantage of whats been given to us already!
if we make games, Brian will give us more to work with. if we dont, we cant just sit here waiting. if you want to make a game, make a game!!
peace
doan

28
Mega Tokyo SCI Archive / Re:Kings Quest IV
« on: September 27, 2004, 08:35:11 AM »
robin is right. right now, it's not possible to edit scripts for KQ4 QfG1 SQ3 etc...but i think there are open source versions of pretty much all the fan-made sci games...am i right? brian's lockergnome quest has an open source download...i think that my quest for the cheat is open source...i think that you can get al pond 2 in open source also.
find lockergnome here:http://www.bripro.com/scistudio/download.php
quest for the cheat: http://www.agigames.com/index.php?action=games&option=browse_sci
al pond 2: http://www.zone.ee/alpond/index.php?action=download - al pond 2 - source
hope that helps
doan

29
Mega Tokyo SCI Archive / Re:Undefined Symbol "var"
« on: September 26, 2004, 10:24:46 AM »
i put this into a game and it didnt keep popping up: what code did you use and does it image what ive got here?
Code: [Select]
(method (handleEvent pEvent)
        (var dyingScript, button)
        (super:handleEvent(pEvent))
        (if(Said('eat/pig'))
            = button Print(
            "Do you want to click Yes or No?"
            #title "Click What?"
            #font LARGE_FONT
            #button " Yes " 1
            #button " No " 0
            )
            (if(== button 1)
                Print("You clicked YES")
            )(else
                Print("You clicked NO")
            )
        )
)

30
Mega Tokyo SCI Archive / Re:Undefined Symbol "var"
« on: September 26, 2004, 09:45:03 AM »
yeah...thats the problem - define the variable like this:
(method (handleEvent pEvent)
        (var button)
then put the (if(Said('blah'))
                  = button Print("Blah")



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

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

Page created in 0.024 seconds with 19 queries.