|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Oct 01, 2006 3:50 am
command input matching problem |
Quote: |
#CLASS {Windows|Mapper|Movement}
#VAR directionmoved {s}
#ONINPUT {{go|jump} ([%w-%s])$} {#if (@hidden) {#sub {sneak %1}}}
#KEY KEY1 {
directionmoved = "sw"
sw
}
#KEY KEY2 {
directionmoved = "s"
s
}
#KEY KEY3 {
directionmoved = "se"
se
}
#KEY KEY4 {
directionmoved = "w"
w
}
#KEY KEY5 {look}
#KEY KEY6 {
directionmoved = "e"
e
}
#KEY KEY7 {
directionmoved = "nw"
nw
}
#KEY KEY8 {
directionmoved = "n"
n
}
#KEY KEY9 {
directionmoved = "ne"
ne
}
#KEY SUB {
directionmoved = "u"
u
}
#KEY ADD {
directionmoved = "d"
d
}
#CLASS 0
#CLASS {Windows|Mapper|Movement|Stealth}
#VAR hidden {1}
#TRIGGER {^You sneak (*)...} {#move @directionmoved}
#TRIGGER {You melt into the background, convinced that your attempt to hide went unobserved.} {hidden = 1}
#TRIGGER {You come out of hiding.} {Hidden = 0}
#CLASS 0
|
The above is a supplement to the mapper so that it continues following me while hidden (other status situations that the mapper doesn't normally follow will be added later after I figure this problem out). To ensure the mapper can still substitute the appropriate commands, all the substitution has to occur outside the macro and after the mapper has been able to convert.
Problem: in the #ONINPUT trigger, how do I get it to recognize both "sw" (a standard exit) and "go bridge" (a non-standard exit)? Currently, matching one means the other doesn't get properly matched and vice versa when under a status effect like HIDE.
Any suggestions? |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Oct 03, 2006 10:15 am |
Use a word list pattern {n|e|s|w|nw|sw|ne|se|u|d|@SpecialExits} and populate the special exits using the onroomenter alias. They can rather quickly be parsed out of the %roomexit info by using #DELITEM on all the standard directions. I also find it necessary to toggle the trigger off and on after updating the variable with #Tą.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|