If I use a perl regex in a trigger to capture text into an array, the array is not erased after the trigger executes.
Since there's no way to specify into which array data is stored, and there's no way to unset the array, there can be only one array.
This allows only one trigger to be created that uses perl regex.
If I create a second trigger that accesses "the array," the second trigger executes the action using a literal string based on the type input I used.
For example, I want to trigger on a line that says
Foo steps out of the teleport booth.
I create a trigger with a regex pattern like this:
^(.*) (\(a\s)(.*)\) steps out of the teleport booth
And that trigger has an action of:
...The first trigger correctly takes the first regex match and stores it in  and then sends "look foo" to the world because "foo" is the contents of .
And then I create a second trigger with this regex pattern:
^(.*) (\(a\s)(.*)\) walks over from the west
With this action:
The second action "ws $_" is sent to the world as "ws 1" which makes no sense, since "1" could not possibly be the contents of .
I have tried this with other MUD clients that have regex triggers and none of them had this problem.
Log in to post a comment.