|
kyran64 Beginner
Joined: 18 Feb 2008 Posts: 11
|
Posted: Mon Nov 16, 2009 6:20 pm
closing a door behind you |
I'm using the Automapper.
Let's say that I want to close a door behind me. I don't necessarily want EVERY door to be shut behind me...just the occasional door here and there.
The way I'm doing it now is:
I've written "#VAR opendoor yes" into the way that the mapper opens doors so that the door is being recorded as having been opened.
In the rooms on each side of the door, I've added an #IF command to the roomscript to check and see if @opendoor = "yes" and if so, set it to "no" and close the door.
And while this seems to work just fine, it's not something I want to do in EVERY room that has a door in it (if I don't, then the opendoor variable will remain "yes" after walking through a non-closing door..which I don't believe will cause any problems, but to me, it's sloppy)
Is there a way I can execute a command upon entering a room ONLY IF I've entered from another specific room? |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Nov 16, 2009 7:44 pm |
There's no built-in way. You could record the room you came from in a variable, and test against it. This could be done in an onRoomEnter event. Have the event check the @oldroom variable, and possibly the current room number, and do whatever. Then have the event set @oldroom to the current room, for the next movement.
|
|
|
|
kyran64 Beginner
Joined: 18 Feb 2008 Posts: 11
|
Posted: Mon Nov 16, 2009 9:50 pm |
Yeah..I was afraid there wouldn't be some kind...ANY kind of built in feature that'd do it for me.
I may switch over to a previous-room variable of some kind. Thanks for the input :) |
|
|
|
|
|