If we can choose a linked object for an exit, then the exit can be made available if that object is open.
This would allow easier implementation of a locked door. The door can be a locked container using the current functionality, with a named key object. If the exit is linked to this door, then the exit only becomes available when the door is unlocked and open.
TriangleGames wrote:I can't seem to make it work your way.
Unlock door.png
How would I go about doing that? I'm not sure where to add the verb, or how to direct it at the exit.
EDIT:Bad form, I apologise; that was very sarcastic of me.
What I meant was, the main point of this conversation is that you can't do that without changing the fundamentals of exits in Quest, OR if you have found a way to directly address exits with "unlock," I'd genuinely love to know how.
levicki wrote: ...(A) is "door" an exit alias in the above example? ... (B) What I was saying is that there is a bug with that (at least I consider it an unintended behavior unless Alex can convince us otherwise). If the bug is fixed, then there is no need to add doors. That was my point. (C) If you can attach a small sample of what you need maybe I could try to figure a way to do that because I am interested in a solution as well.
sgreig wrote:... Alex and I were discussing this ... he is implementing something where you can specify an associated object on the exit that would act as a "door" so to speak, which you could use items like keys on in order to unlock the exit.
Pertex wrote:It's here in the issue tracker: http://quest.codeplex.com/workitem/1247
levicki wrote:To me, problem seems to be that if you type "unlock bathroom" because your exit has an alias "bathroom" the game will incorrectly set objtype to "object" instead of "exit" and pass that into ResolveNextName(). That will in turn call ResolveName() which will call ResolveNameInternal() and even though ResolveNameInternal() has the code for exit handling it won't be executed because it got the wrong objtype as a parameter which means exit won't be visible and you will get the famous "I can't see that. (bathroom)" message.
This is really a parsing bug in my opinion, and I am not sure it can be handled just by changing CoreParser.aslx.
TriangleGames wrote:Okay... well if you understand how the bug works, then you might add a request to fix it in the issue tracker or the uservoice suggestions. I have no idea how simple-vs-complex fixing that might be, or where it would fall in Alex's priorities right now, but it could certainly be put on a "to-do" list. In the mean time though ... new users need to be told how to make a door unlock, so until it's changed/fixed, I'm gonna tell people to use a tertiary object. I mean, I'm not gonna try to explain all about why they have to in THAT kind of detail, because a new user whose not familiar with programming might not even understand all that. If it's fixed/changed later, the "how to" can always be changed along with it.
levicki wrote:I do understand because I just tried to make that work and ended up adding Log() statements into CoreParser.aslx in order to see where exactly the problem lies. Just to be clear, I do not mind if you keep telling people to use tertiary object in the howto, I just mind if that becomes default way of doing it because it increases object count dramatically, cluttering the object list and slowing down game development.
As for the issue, I registered an account and I will submit it soon.
TriangleGames wrote:Well, part of the reason I originally asked about why it works this way, is so I could mention it (in simple terms) in the guide. So, if there's ever so much as an official plan to change it, I would add that in. Although, I suppose my mentioning it is no guarantee of if/when it would happen. I'm not sure it would create as much clutter as you're picturing though, as it would only be necessary for locked or hidden exits, not all the exits. So, I guess it would depend on how many locked exits a person was planning to include.