Show objects other persons are wearing

qroft
Hi there,
on my first QUEST game i have a guy in a room wearing some sunglasses.
On the object/room pane i can see that guy listed.
I want that the sunglasses he is wearing jus appear when i write "look at guy".
I know that this can be down with container objects (just show child objects when parent object is looked at).
But how can i do this with persons?

In theory i want to
1. look at guy and get the answer "he is a man wearing some sunglasseS".
2. look at sunglasses getting something like "they are some neat sunglasses".

This is my structure:
sunglsses-problem.jpg
sunglsses-problem.jpg


Thanks in advance for your time and support!
Carlos

The Pixie
I would set the person up as a surface, which is one of the types of container, and play around with the options on the container tab.

Silver
yeah, what pixie says. And maybe make the sunglasses a scenery object. It only gets a bit complex if you can envisage a point when the guy won't be wearing the sunglasses. Because you'll then need to return a script instead of a description for "examine guy".

The Pixie
Not too complicated.
if (sunglasses.parent = this) {
msg("It's some guy in sunglasses.")
}
else {
msg("It's some guy suspiciously not wearing sunglasses.")
}

Silver
I would have set flags and allsorts. :oops: I need to memorise that code.

The Pixie
The thing to remember is that Quest knows where the sunglasses are, so there has to be some way to get that information, without you having to track what the sunglasses are doing too.

Silver
I'm a bit obsessed with the text processor at the moment, so I think in booleans; although I don't think I would have thought about doing it that way regardless. It's interesting to know. Even though you already pointed out 'this' to me previously when I was exploring aliases for verbs.

Silver
Or rather I think in true/false boolean attributes.

The Pixie
I must admit, I tend not to use the text processor, mainly by habit, as it was not there when I first started to use Quest/

Silver
It wouldn't really make much difference in your example, where it returns one of two possible strings. Your script there works fine enough. You can get quite creative with it though, even changing how a sentence is constructed depending on what's going on with variables, such as inserting/altering text when certain things have been looked at or people spoken to, if the room has changed in any way etc. Although it can easily get complicated if you've got too many plates spinning at once and the only way to properly proof read is to test every variable.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums