Author Topic: Advanced Said() Strings - Part 2 - Qualifying Adjectives  (Read 12971 times)

0 Members and 3 Guests are viewing this topic.

Offline gumby

Advanced Said() Strings - Part 2 - Qualifying Adjectives
« on: November 27, 2010, 03:48:02 PM »
Qualifying adjectives:

Code: [Select]
(if(Said('take/key<gold'))
      Print("Ahh!  The gold key!")
)

(if(Said('take/key<silver'))
      Print("Ahh!  The silver key!")
)

(if(Said('take/key'))
      Print("Which key do you mean, the silver or the gold key?")
)

This example forces the user to use the correct adjective in order to pick up a key.  If the user does not, it falls through to the last rule which tells the user that they must be more specific.
« Last Edit: November 30, 2010, 11:43:28 AM by gumby »


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Cloudee1

Re: Advanced Said() Strings - Part 2
« Reply #1 on: November 27, 2010, 09:09:51 PM »
Why the hell did it take 5 years to get this syntax right? It certainly looks simple enough. I assume this would also work for top/bottom drawer or red/green door. I spent days trying to get top and bottom drawer to work, only to ultimately give up and go with one drawer.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline gumby

Re: Advanced Said() Strings - Part 2
« Reply #2 on: November 28, 2010, 04:02:00 PM »
Why the hell did it take 5 years to get this syntax right? It certainly looks simple enough. I assume this would also work for top/bottom drawer or red/green door. I spent days trying to get top and bottom drawer to work, only to ultimately give up and go with one drawer.
Yes, it will work with any adjective.  Honestly, I found the syntax here in the tutorials (I think).  Or it might have been in the Studio help files.  Or it was from Lars' parser documentation at the FreeSCI site...

Now admittedly, I had to bumble around for a few hours before I got it working.  But I think most of us work off of examples (I know I do) - 'straight-up' syntax docs sometimes can be too much to digest.
« Last Edit: November 28, 2010, 09:52:31 PM by gumby »
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline MusicallyInspired

Re: Advanced Said() Strings - Part 2
« Reply #3 on: November 28, 2010, 10:38:55 PM »
I believe you found an example in an area of the Studio help file that had nothing to do with syntax at all. It's still so bizarre to me why Brian never documented this stuff and why nobody ever asked.
Brass Lantern Prop Competition

Offline Cloudee1

Re: Advanced Said() Strings - Part 2
« Reply #4 on: November 28, 2010, 10:55:22 PM »
Oh no, I asked. If the MT archives were still here, they are in there. Alot of the questions Bri answered, Either I didn't get it or something. I remember this one changestate in spongebob that was kicking my ass. Ultimately I gave up and took a different route.    Oh weel small consolation that now there is no changestate troubles. I think that has more to do with companion though than me.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline stateofpsychosis

Re: Advanced Said() Strings - Part 2 - Qualifying Adjectives
« Reply #5 on: December 11, 2014, 09:41:32 AM »
oh this method works soooo much better than this one: http://sciprogramming.com/community/index.php/topic,351.html


MAJOR major kudos to you sir.

late response :P

Offline Cloudee1

Re: Advanced Said() Strings - Part 2 - Qualifying Adjectives
« Reply #6 on: January 21, 2015, 01:49:44 PM »
Added to tutorials > SCI > Your first game > Handling the Player's "Said" Input
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition


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

Page created in 0.041 seconds with 21 queries.