I think I am complicating doors. Help?

For help with creating games using Quest

Moderators: Pertex, Cryophile, Alex, sgreig

I think I am complicating doors. Help?

Postby sbangs » Thu Dec 09, 2010 2:46 pm

I read that long post about doors being objects and so on, and it really didn't help what I think is about to be a really simple yet dumb questions.

What is the easiest way to handle a locked door in between 2 rooms, the living room and the kitchen.

Should I make an object in the kitchen called doorkit2liv with an alias of door? Then again make an object in the living room called doorliv2kit with an alias of door?

Then set both objects the same "type" for the lock/unlock properties?

I know I must not be seeing the simple solution here, so forgive, but if you can give some advice to do this the quickest and easiest way, much thanks.

S
sbangs
 
Posts: 58
Joined: Thu Nov 18, 2010 8:41 pm

Re: I think I am complicating doors. Help?

Postby Pertex » Thu Dec 09, 2010 9:09 pm

Why dont you use the Locked-Checkbox in the Exits-Tab of the rooms?
User avatar
Pertex
 
Posts: 1041
Joined: Fri Jul 09, 2010 9:52 am
Location: germany

Re: I think I am complicating doors. Help?

Postby sbangs » Thu Dec 09, 2010 10:36 pm

I am using those, but I guess I'm trying to think of doors as an object that needs to be unlocked, then opened. It seems as doors can have 4 properties. Locked/unlocked/open/closed. How do I have that for a door of a door that links two rooms?

I may be confusing myself, just seems like I would need to do that.

S
sbangs
 
Posts: 58
Joined: Thu Nov 18, 2010 8:41 pm

Re: I think I am complicating doors. Help?

Postby Pertex » Sat Dec 11, 2010 1:11 pm

You seem to be right, you need 2 Objects
User avatar
Pertex
 
Posts: 1041
Joined: Fri Jul 09, 2010 9:52 am
Location: germany

Re: I think I am complicating doors. Help?

Postby sbangs » Sun Dec 12, 2010 9:00 pm

Ok, so I added an open and a close script to my door (object) and I messed up the open/close commands for my containers. I wish that would never happen btw.

So how do I use a door? Sorry, very confused.

S
sbangs
 
Posts: 58
Joined: Thu Nov 18, 2010 8:41 pm

Re: I think I am complicating doors. Help?

Postby Pertex » Mon Dec 13, 2010 6:17 pm

OK, here is my door-script. I'm not using a container, just a normal object. You can copy such a door to every room you want within QDK. I prefer copying the door-object to an external editor, replacing the objectname and after loading the asl modifying the exits in QDK
Attachments
room.asl
(2.42 KiB) Downloaded 47 times
User avatar
Pertex
 
Posts: 1041
Joined: Fri Jul 09, 2010 9:52 am
Location: germany

Re: I think I am complicating doors. Help?

Postby sbangs » Tue Dec 14, 2010 1:04 am

Cool, downloaded it, will check it out. Thanks much.

S
sbangs
 
Posts: 58
Joined: Thu Nov 18, 2010 8:41 pm

Re: I think I am complicating doors. Help?

Postby sbangs » Tue Dec 14, 2010 1:23 am

So just on first glance, I see you are using verbs on the door ojbect, like open/close/lock/unlock.

How can you do this and not screw up the default verbs of those same names? This is one of my biggest issues. When I add an open verb to an object, suddenly the default open script doesn't work, so my containers wont open and so on.

Thanks for any advice you can offer again.

Scott
sbangs
 
Posts: 58
Joined: Thu Nov 18, 2010 8:41 pm

Re: I think I am complicating doors. Help?

Postby Alex » Tue Dec 14, 2010 9:39 am

Instead of adding open/close verbs to doors, set the door up as a container and then run custom script for "open" and "close" on the container tab (yes it a bit of a hack really).
User avatar
Alex
Site Admin
 
Posts: 2048
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK

Re: I think I am complicating doors. Help?

Postby Pertex » Tue Dec 14, 2010 4:10 pm

Aha. Does that mean that its a bad idea to define the verbs open, close, add and remove in the Verbs-menu? If I want to use this verbs, I have to use containers?
User avatar
Pertex
 
Posts: 1041
Joined: Fri Jul 09, 2010 9:52 am
Location: germany

Re: I think I am complicating doors. Help?

Postby Alex » Tue Dec 14, 2010 9:59 pm

Yes that's right. If you define open/close/add/remove as verbs, you'll override the built-in container behaviour so your containers will break!
User avatar
Alex
Site Admin
 
Posts: 2048
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK

Re: I think I am complicating doors. Help?

Postby sbangs » Wed Dec 15, 2010 12:29 am

Because it seems like such a common need, and the verb option is on the first page of an object, cant there be a way to use that feature to add a verb to the object and not override the game verb. Open/close is quite common, so if I want a special script to run if I want open verb assigned to the "urn" but the default open is untouched for all the containers, is that doable?

Thanks,

Scott
sbangs
 
Posts: 58
Joined: Thu Nov 18, 2010 8:41 pm

Re: I think I am complicating doors. Help?

Postby Alex » Wed Dec 15, 2010 2:05 pm

Yes you just have to put your script on the Container tab - don't add it as a verb.
User avatar
Alex
Site Admin
 
Posts: 2048
Joined: Fri Jun 27, 2003 11:06 pm
Location: London, UK

Re: I think I am complicating doors. Help?

Postby Pertex » Wed Dec 15, 2010 4:14 pm

I changed my script. I didnt test it with other containers but it should work now
Attachments
door.asl
(2.35 KiB) Downloaded 56 times
User avatar
Pertex
 
Posts: 1041
Joined: Fri Jul 09, 2010 9:52 am
Location: germany


Return to Quest Forum

Who is online

Users browsing this forum: No registered users and 1 guest