Community
SCI Programming => SCI Community How To's & Tutorials => Topic started by: gumby on November 27, 2010, 03:48:02 PM
-
Qualifying adjectives:
(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.
-
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.
-
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.
-
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.
-
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.
-
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
-
Added to tutorials > SCI > Your first game > Handling the Player's "Said" Input