Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
NitroGlycerine
Beginner


Joined: 26 Apr 2007
Posts: 29

PostPosted: 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.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
NitroGlycerine
Beginner


Joined: 26 Apr 2007
Posts: 29

PostPosted: Thu May 01, 2008 11:35 pm   
 
Ah great new!
Using %w works fine anyway.
Thanks for the clarification!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net