All These Annoying Closed Doors

by Unknown

Back to Ideas.

Unknown2009-01-23 18:59:17
Would it be selfish on my part to ask for a change from this:

There is a pine door in the way.

to something like this:

There is a pine door in the way to the north.

As it is now, making a trigger to open said door is near impossible and makes walking around in Celest more trouble than it's worth. Of course, I could trigger that to open doors in every direction until it hits the right one, but that would just be spammy. Unless, some of you have a better idea about how to properly trigger something like that?
Unknown2009-01-23 19:02:47
You setup your movement aliases to store the last direction you moved and then use that for opening the door (or avoiding other obstacles, such as walls).
Jonas2009-01-23 20:32:08
Um...in English? Since I'm interested in this, too. Could I code this in nexus?
Unknown2009-01-23 20:39:38
As in, let's say you use "n" to move north.

You would make an alias that matches on "n" which would send the actual command north to the game, and then set a variable, called "lastDirection" equal to north.

That way, you could trigger the door closed message to "open door @lastDirection" and then send the direction as a command, to move again.
Rika2009-01-23 20:56:53
In Nexus..

Do the following for all directions.
Alias: n
#set lastdir n

Trigger: There is {*} door in the way.
open door $lastdir
$lastdir
Unknown2009-01-23 21:05:32
What happens when the door is locked? Wouldn't that cause an infinite loop? smile.gif
Catarin2009-01-23 21:12:57
QUOTE (Zarquan @ Jan 23 2009, 02:05 PM) <{POST_SNAPBACK}>
What happens when the door is locked? Wouldn't that cause an infinite loop? smile.gif


No, eventually it sends a "You cannot move that quickly" or whatever and stops itself.
Rika2009-01-23 21:17:19
Hmm good point. Except it's Nexus, so that won't happen. sad.gif

I'm too annoyed at the lack of a revolt to think how to code it right now.
Unknown2009-01-23 21:51:33
So, going off the Nexus example, for Zmud, I would just do this:

#VAR LastDirection {}
#KEY KEY8 {n;not sure what should go here}
#TRIGGER {^There is a %w door in the way.} {open door @LastDirection;@LastDirection}

Is that even remotely correct? Pardon, I'm no coder and not sure how to make it set a variable.
Catarin2009-01-23 22:22:55
QUOTE (julie @ Jan 23 2009, 02:51 PM) <{POST_SNAPBACK}>
So, going off the Nexus example, for Zmud, I would just do this:

#VAR LastDirection {}
#KEY KEY8 {n;not sure what should go here}
#TRIGGER {^There is a %w door in the way.} {open door @LastDirection;@LastDirection}

Is that even remotely correct? Pardon, I'm no coder and not sure how to make it set a variable.


#VAR LastDirection {}
#KEY KEY8 {n;#VAR LastDirection n}
#TRIGGER {^There is a %w door in the way.} {open door @LastDirection;@LastDirection}

If you're wanting to avoid a locked door situation you can do something like

#VAR LastDirection {}
#VAR LockedDoor 0
#KEY KEY8 {n;#VAR LastDirection n}
#TRIGGER {^There is a %w door in the way.} {#IF (!@LockedDoor) {open door @LastDirection;@LastDirection} {#VAR LockedDoor 0}}
#TRIGGER {A locked door pattern} {#VAR LockedDoor 1}

EDIT: Though I'd do something like "There is * door in the way." for the pattern. Just to cover the bases of types of doors in the simplest way. "There is {a|an} %w door in the way." would work too if you're positive there are no two word door types.
Unknown2009-01-23 22:43:52
How wonderfully helpful, thanks! How's this look:

CODE
#CLASS {Doors and Directions}
#VAR LastDirection {}
#VAR LockedDoor 0
#TRIGGER {^There is a * door in the way.} {#IF (!@LockedDoor) {open door @LastDirection;@LastDirection} {#VAR LockedDoor 0}}
#TRIGGER {This * door has been magically locked shut.} {#VAR LockedDoor 1}
#KEY KEY8 {n;#VAR LastDirection n}
#KEY DIV {up;#VAR LastDirection up}
#KEY MULT {down;#VAR LastDirection down}
#KEY KEY0 {in;#VAR LastDirection in}
#KEY DEc {out;#VAR LastDirection out}
#KEY KEY7 {nw;#VAR LastDirection nw}
#KEY KEY9 {ne;#VAR LastDirection ne}
#KEY KEY4 {w;#VAR LastDirection w}
#KEY KEY6 {e;#VAR LastDirection e}
#KEY KEY1 {sw;#VAR LastDirection sw}
#KEY KEY2 {s;#VAR LastDirection s}
#KEY KEY3 {se;#VAR LastDirection se}


Who knows, I might actually end up learning how to code enough to make my own system! biggrin.gif
Catarin2009-01-23 23:00:06
QUOTE (julie @ Jan 23 2009, 03:43 PM) <{POST_SNAPBACK}>
How wonderfully helpful, thanks! How's this look:

CODE
#CLASS {Doors and Directions}
#VAR LastDirection {}
#VAR LockedDoor 0
#TRIGGER {^There is a * door in the way.} {#IF (!@LockedDoor) {open door @LastDirection;@LastDirection} {#VAR LockedDoor 0}}
#TRIGGER {This * door has been magically locked shut.} {#VAR LockedDoor 1}
#KEY KEY8 {n;#VAR LastDirection n}
#KEY DIV {up;#VAR LastDirection up}
#KEY MULT {down;#VAR LastDirection down}
#KEY KEY0 {in;#VAR LastDirection in}
#KEY DEc {out;#VAR LastDirection out}
#KEY KEY7 {nw;#VAR LastDirection nw}
#KEY KEY9 {ne;#VAR LastDirection ne}
#KEY KEY4 {w;#VAR LastDirection w}
#KEY KEY6 {e;#VAR LastDirection e}
#KEY KEY1 {sw;#VAR LastDirection sw}
#KEY KEY2 {s;#VAR LastDirection s}
#KEY KEY3 {se;#VAR LastDirection se}


Who knows, I might actually end up learning how to code enough to make my own system! biggrin.gif


Yep, you've got it. There is more than just that one locked pattern. Don't know the others off hand! And it's been awhile since I've done zmud but if the #IF (!@LockedDoor) doesn't work then #IF {!@LockedDoor} will.
Rika2009-01-23 23:12:58
Change
#TRIGGER {^There is a * door in the way.}
to
#TRIGGER {^There is * door in the way.}
Unknown2009-01-24 01:12:19
It works! Thanks a ton.