|
NitroGlycerine Beginner
Joined: 26 Apr 2007 Posts: 29
|
Posted: Thu May 01, 2008 7:44 pm
[2.21] and [2.22] odd trigger behavior |
I try to trigger for the lines:
Lunging forward with long, flashing claws extended, you tear into the flesh of Someone's left leg.
Horror overcomes Someone's face as his body stiffens into paralysis.
I am using the pattern:
^Lunging forward with long, flashing claws extended, you tear into the flesh of @t's (%w) (%w).$Horror overcomes @t's face as {his|her} body stiffens into paralysis.$
Where @t contains the name of my target. This trigger doesn't seem to be working. But when I use this pattern:
^Lunging forward with long, flashing claws extended, you tear into the flesh of @t's (%w) (%w).$%w overcomes @t's face as {his|her} body stiffens into paralysis.$
the trigger DOES work.
I really fail to see how this comes, apparently the "$Horror" is causing the problems and replacing it with a %w wildcard seems to solve the issue. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu May 01, 2008 9:16 pm |
it's a bug - $Horror looks like a local variable. You could try using a multistate trigger in the meantime:
#trig {^Lunging forward with long, flashing claws extended, you tear into the flesh of @t's (%w) (%w).$} {commands for first line go here}
#cond {^Horror overcomes @t's face as {his|her} body stiffens into paralysis.$} {commands for second line go here} {within|param=1} |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu May 01, 2008 9:37 pm |
This is also fixed in v2.23. Since there were several other ways to construct a trigger pattern using local variables, I have changed the $ within a pattern so that it is parsed as a newline indicator instead of a local variable. This doesn't effect using ($var:pattern) which will still work fine.
|
|
|
|
NitroGlycerine Beginner
Joined: 26 Apr 2007 Posts: 29
|
Posted: Thu May 01, 2008 11:35 pm |
Ah great new!
Using %w works fine anyway.
Thanks for the clarification! |
|
|
|
|
|