Is there a way to "Put X in Y" in Quest?

bitterkarella
Hi! I'm working on my first game using Quest 5.6.1 and I'm wondering if there's any way to use two objects together with doing "Use x with y?"

For example, in the game I'm writing, I'd like to have the player character insert a CD into a disc drive, but the only way that I've been able to do this is to do "use CD with disc drive" when I'd really prefer to be able to "put CD into disc drive" or "insert CD into disc drive."

Similarly, I'd like to be able to "open door with key" rather than "use key with door."

This is probably a really easy thing that I'm just missing, but I just can't figure it out. Hopefully someone here can point me in the right direction. Thanks for your help! :)

The Pixie
Some of it in built-in.
For PUT X IN Y, make Y a container - tick container on features tab, select Container on the container tab.
For USE X WITH Y, tick Use/give on the features tab for either X or Y, and set it up on the Use/give tab.

For stuff that is not built in, see this handy tutorial:
viewtopic.php?f=18&t=5862

bitterkarella
Thanks for the help! I've changed the disc drive to a container, but there still doesn't seem to be a way to put anything inside it without using the "use" command. I can make the CD appear inside the drive by using the command "Use CD with discdrive," but there's doesn't seem to be any way to make "put CD into discdrive" or "insert CD into discdrive" work as a command?

If I use the "require another object" function, I can put together the command "put CD with disc drive" or "insert CD with disc drive" but I can't get it to use "in" or "into" instead of "with."

I tried following the tutorial and using

^(put) (?<object_CD>.*) in (?<object_discdrive>.*)$
msg ("You put the CD in the drive.")
RemoveObject (CD)

but it just seems like that broke the code. Is there something I'm missing? I'm really new to this, so I'm pretty sure there I'm just being very obtuse, so thanks for your patience! :) Thanks again for your help!

XanMag
It might be easier for now to ignore the fancy symbols for now.

1. Right click the room where your disc drive is located.
2. Click Add command.
3a. Under command pattern, type the following: put cd in drive; put cd in disc drive; put disc in drive; place cd in drive; place cd in disc drive; insert cd in drive; insert cd in disc drive; insert disc in drive; use disc in drive; use disc in disc drive; use disc on drive; use disc on disc drive; use cd on drive; use cd in drive; use cd in disc drive; use cd on disk drive
3b. If you want to put more options in there including articles or whatever other commands you can think of that means the same thing as 'put cd in drive' go for it. Just separate with a ;
4. If you include put disc in drive (or a variation of) all you need to do is use the move object script to move the cd to the disc drive. WHen the plaer looks at the disc drive (or opens it) you will see the message that is contains a cd.
5. Unless your player NEEDS the CD back, don't worry about making it retrievable again, just remove it. If you want a little more realism, add another command in the same room about removing the cd - remove cd from drive; etc; etc; etc... and print a message like 'You've used the cd already and there is no need to remove it from the computer.

If you want further help, like a working template to "cheat" from. let me know and I'll attach a workable .aslx file to another post.

You can also check out the "game' 'Quest - Tutorials and Templates'. The 'container room' may be helpful. It is designed to help people who are more comfortable using the GUI (Quest editor page) overcome common obstacles. http://textadventures.co.uk/games/view/ ... -templates

Good luck and ask if you have questions.

XanMag

bitterkarella
Oh cool, I get it! Thanks muchly :)

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

Support

Forums