Nested descriptions?..also custom input prompt
waturi
04 Jun 2013, 22:20Did a search and didn't find what I'm looking for, sorry if these are redundant questions...
1. How do I make nested descriptions using the GUI (don't know squat about code). Here is my situation: I have an object called "Pocketwatch", it is takeable, the description is, "An old-fashioned men's pocket watch on a chain. There is an intricate design etched on the back". What I would like is if the player/reader types "look at design" they get a deeper description of the design. I tried creating a scenery object called "design" with the Pocketwatch as its parent but I just get a message "You can't see that."
2.Is there a way (again, using the GUI) that one can customize the look of the player input line to something other that the orange box and the "Type Here..." message. I just want a simple ">"
If someone's got the answers or can point me to the relevant forum post or wiki page it would be greatly appreciated.
Thanks
1. How do I make nested descriptions using the GUI (don't know squat about code). Here is my situation: I have an object called "Pocketwatch", it is takeable, the description is, "An old-fashioned men's pocket watch on a chain. There is an intricate design etched on the back". What I would like is if the player/reader types "look at design" they get a deeper description of the design. I tried creating a scenery object called "design" with the Pocketwatch as its parent but I just get a message "You can't see that."
2.Is there a way (again, using the GUI) that one can customize the look of the player input line to something other that the orange box and the "Type Here..." message. I just want a simple ">"
If someone's got the answers or can point me to the relevant forum post or wiki page it would be greatly appreciated.
Thanks
george
04 Jun 2013, 22:412nd question first, there was a thread about that recently...
viewtopic.php?f=10&t=3687
You never would guess it from the thread title, but that's the thread
For the first question, I know exactly what you mean though I'm not sure what the 'Quest way' is for that sort of thing as I'm pretty new myself. I'll let someone else weigh in.
viewtopic.php?f=10&t=3687
You never would guess it from the thread title, but that's the thread

For the first question, I know exactly what you mean though I'm not sure what the 'Quest way' is for that sort of thing as I'm pretty new myself. I'll let someone else weigh in.
Liam315
05 Jun 2013, 02:19With the design you've done everything right so far but are just missing a couple of final steps. You need to make the pocket watch a container so that Quest can "see" into it and notice the "design" object.
The wiki article on implementing components of an object (http://quest5.net/wiki/Implementing_components_of_an_object) suggests making it a surface, but I would recommend making the pocket watch a "limited container." Deselect all the checkboxes except "is open" and set the max objects for the container to 0. Doing it this way stops people from being able to put other items on/in the pocket watch, whereas setting it as a surface would not.
You could also make it a closed container, and just set the transparency to "true." You may need to double check that you can actually examine it like this as the transparency setting may only be for the purposes of listing children of a closed container.
EDIT: I checked and it isn't so both methods work fine, in fact the second is probably better.
The wiki article on implementing components of an object (http://quest5.net/wiki/Implementing_components_of_an_object) suggests making it a surface, but I would recommend making the pocket watch a "limited container." Deselect all the checkboxes except "is open" and set the max objects for the container to 0. Doing it this way stops people from being able to put other items on/in the pocket watch, whereas setting it as a surface would not.
You could also make it a closed container, and just set the transparency to "true." You may need to double check that you can actually examine it like this as the transparency setting may only be for the purposes of listing children of a closed container.
EDIT: I checked and it isn't so both methods work fine, in fact the second is probably better.
waturi
05 Jun 2013, 05:10Thanks Liam! worked like a charm.
But now I have a hypothetical conundrum...
Suppose I have the same situation except that the pocket watch is now a cigar box with an intricate design. Is there a way I could have the design visible at all times, but only the contents visible when the box is open?
But now I have a hypothetical conundrum...
Suppose I have the same situation except that the pocket watch is now a cigar box with an intricate design. Is there a way I could have the design visible at all times, but only the contents visible when the box is open?

Pertex
05 Jun 2013, 06:29DOes that mean that you want to have several design objects in one room?
Liam315
05 Jun 2013, 07:59waturi wrote:Suppose I have the same situation except that the pocket watch is now a cigar box with an intricate design. Is there a way I could have the design visible at all times, but only the contents visible when the box is open?
Interesting question, there may be a few ways to go about it but here's what I would do. I am assuming you want the box closed to begin with and containing an item.
1. Make the box a container like you normally would for putting things in.
2. Make that box transparent.
3. Create 2 objects and place them inside the box. 1 will be the design and you can set it's description, name etc. as such. The other will be a compartment for the box which we'll name box_compartment.
4. Make sure both the design and box_compartment are scenery objects and NEITHER of them should be a container.
5. Put the objects you wish the box to contain in the box_container object (even though this object is not actually set as a container).
6. Go to the container tab for the box, and go down to where you can enter scripts for "after opening" and "after closing" the object."
7. Copy these scripts. (You may need to edit the words "box" and "design" in the script so they match up with the actual names of the objects you have already created.)
After Opening:
foreach (object, GetDirectChildren(box_compartment)) {
MoveObject (object, box)
}
After Closing:
movelist = NewObjectList()
foreach (object, GetDirectChildren(box)) {
list add (movelist, object)
}
list remove (movelist, box_compartment)
list remove (movelist, design)
foreach (object, movelist) {
MoveObject (object, box_compartment)
}
A quick explanation of these steps:
What we're doing is making sure the design is visible at all times by making the box transparent. However, we want the objects inside it to be hidden while the box is closed, so when that is true we're hiding the object inside another object which is not transparent. When the box is opened we want to be able to see and take the objects inside so we need to move them between the box itself (where they can be seen) and the compartment (where they cannot).
The script for on opening is simple enough, we just move everything that's inside the box_compartment to the box. Moving them back is a little more complicated though as we want both the design and the compartment to stay where they are. This is especially important because the box_compartment can't be moved inside itself. To this end we make a list of all the children objects in the box, remove the design and box_compartment from that list, then move the remaining items. The result- the design is still visible after closing it but the objects inside have been hidden away.
If you need any further explanation for any of these steps then let me know. Or if I've missed something obvious (which often happens) I'm sure Sora will be along to correct me shortly

Sora574
05 Jun 2013, 16:34Actually... That should work perfectly. I can't think of any reason to change it.
EDIT: Sorry, actually... You could just use visibility instead of creating a separate object to put them in. That might not work as well, though... I don't know, I can't test it right now. It might not even be what you want to happen.
EDIT: Sorry, actually... You could just use visibility instead of creating a separate object to put them in. That might not work as well, though... I don't know, I can't test it right now. It might not even be what you want to happen.
waturi
05 Jun 2013, 17:32Thanks again! Not a situation I've come to yet but if it arises now I have something to refer back to.