FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Faucett in a sink

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Tdarcos



Joined: 16 May 2008
Posts: 4441
Location: University Park, Maryland

PostPosted: Sun Sep 09, 2012 1:55 pm    Post subject: Faucett in a sink Reply with quote

I'm trying to have a faucet in a sink that the user can get water out of it. I'll flesh it out but I just want to have the system recognize I can do this.

Given the following

Code:
object sink "sink"
{
   in Kitchen
   article "a"
   is static, container
}
object faucet "faucet"
{
   in Sink
   article "a"
   is static, openable
   is not open
}



This is what happens (forget the redundant descriptions, I'll drop those later):

You're in the control center
You are in the main control center. You can go in any of the twelve directions from here.

>in

You're in the kitchen off the control center
You are in a typical kitchen/break room of an office but expanded since people often spend considerably more time than normal here. There is a stove with an
oven, a refrigerator, a microwave oven, a sink with a faucet, a coffee pot on a coffee maker, and some packets of coffee sitting on the counter. There really
isn't much you'd want to do here. Go OUT to return to the control center.
A stove with an oven, a microwave oven, a sink, a refrigerator, and a coffee maker are here. Inside the sink is a faucet. Sitting on the coffee maker is a
coffee pot.

>open faucet
That doesn't make any sense.

If faucet is a component instead of an object then it doesn't show up as being in the sink. And I still can't open it. Funny, it worked for the drain valve in Teleporter Test, only that was in the room, not in an object. Do I have to tell the sink or the faucet it's reachable from the kitchen or something?
_________________
The lessons of history teach us - if they teach us anything - that no one learns the lessons of history.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tdarcos



Joined: 16 May 2008
Posts: 4441
Location: University Park, Maryland

PostPosted: Sun Sep 09, 2012 2:01 pm    Post subject: Reply with quote

Adding the following

Code:
object hose "hose"
{
   in Kitchen
   article "a"
   is static, openable
   is not open
}

Gives the same error trying to open it as the faucet when in the kitchen.
_________________
The lessons of history teach us - if they teach us anything - that no one learns the lessons of history.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tdarcos



Joined: 16 May 2008
Posts: 4441
Location: University Park, Maryland

PostPosted: Sun Sep 09, 2012 2:18 pm    Post subject: Reply with quote

Found the problem.
Code:

object faucet "faucet"
{
   in Sink
   article "a"
   adjectives "faucet"
   is static, openable
   is not open

}

I needed to give the faucet an adjective even though it was the same as its name, and then it will recognize the "open" command. I think I'll add "turn" and "on" and "off" for it too.
_________________
The lessons of history teach us - if they teach us anything - that no one learns the lessons of history.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Sun Sep 09, 2012 2:36 pm    Post subject: Reply with quote

Actually, instead of adjective, you should be giving it the noun "faucet" (and yes, the noun and adjective properties are completely separate from the name property, as far as the parser is concerned).

Also, you may want to look at Future Boy!'s plumbing code, as that might save you some work: http://hugo.gerynarsabode.org/index.php?title=Plumbing
Back to top
View user's profile Send private message AIM Address
Tdarcos



Joined: 16 May 2008
Posts: 4441
Location: University Park, Maryland

PostPosted: Sun Sep 09, 2012 10:10 pm    Post subject: Reply with quote

Roody_Yogurt wrote:
Actually, instead of adjective, you should be giving it the noun "faucet" (and yes, the noun and adjective properties are completely separate from the name property, as far as the parser is concerned).

Why, what's the significance? Is there a reason for using "noun" (or is it "nouns", or both) over "adjectives", and why do you say "adjective", is that just straight English response or is it also an alias for "adjectives"? How would you know which?
Roody_Yogurt wrote:
Also, you may want to look at Future Boy!'s plumbing code, as that might save you some work: http://hugo.gerynarsabode.org/index.php?title=Plumbing

Thanks for the suggestion, right now I just have the faucet in the kitchen sink to fill the coffee pot. It provides a whole bunch of fun things. The coffee pot is initially on top of the coffee maker empty, if you start the coffee maker without putting water in the pot, the (dry) coffee pot shatters and melts. If you say "fill pot" or "fill pot from faucet" and you left the pot on the coffeemaker, it tells you you're not holding it. If you didn't start the faucet it tells you it's not running. (Oh damn, I need to add the verb "run" so someone can "run faucet" if it's not there.) So then you can put the pot on the coffee maker and start it, to get a pot of hot water. So I don't think I need that much capability yet.

Actually, come to think of it I might use the plumbing capability in the other bathroom.
_________________
The lessons of history teach us - if they teach us anything - that no one learns the lessons of history.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roody_Yogurt



Joined: 29 Apr 2002
Posts: 1993
Location: Milwaukee

PostPosted: Sun Sep 09, 2012 10:24 pm    Post subject: Reply with quote

Tdarcos wrote:
Roody_Yogurt wrote:
Actually, instead of adjective, you should be giving it the noun "faucet" (and yes, the noun and adjective properties are completely separate from the name property, as far as the parser is concerned).

Why, what's the significance? Is there a reason for using "noun" (or is it "nouns", or both) over "adjectives", and why do you say "adjective", is that just straight English response or is it also an alias for "adjectives"? How would you know which?


I believe the parser gives higher priority to noun properties over adjective properties, so if you have another object with "faucet" as a noun, that object will always be chosen, instead of getting a proper, 'Which faucet do you mean?' response (of course, it's unlikely that you'll have two faucets in one room, but still, there's something to be said about doing things the right way).

And yeah, "adjectives" is an alias of "adjective" and "nouns" is an alias of "noun." I usually just refer to the single form.
Back to top
View user's profile Send private message AIM Address
Bainespal



Joined: 09 Jul 2010
Posts: 151

PostPosted: Mon Sep 10, 2012 2:50 pm    Post subject: Reply with quote

Roody_Yogurt wrote:

I believe the parser gives higher priority to noun properties over adjective properties, so if you have another object with "faucet" as a noun, that object will always be chosen, instead of getting a proper, 'Which faucet do you mean?' response (of course, it's unlikely that you'll have two faucets in one room, but still, there's something to be said about doing things the right way).

Also, my understanding of the Hugo Book (page 46 according to the notation on the page, literally page 56 in the PDF doc) is that any combination of adjectives can come before a noun in the player's command. So, if the adjectives were "leaky" and "silver" and the noun was "faucet," the player could type "X LEAKY SILVER FAUCET" or "X SILVER" but not "X FAUCET SILVER LEAKY".
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended