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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Sogdog
Newbie


Joined: 11 Dec 2007
Posts: 8

PostPosted: Sat Sep 17, 2011 1:45 am   

A little help with triggers please
 
I'm trying to set up a warning system to inform me when certain people leave my room.

I've made a variable @enemies and added the names of the people to it. And a trigger with this pattern
^{@enemies} has just walked
and this value
#echo %upper( "%1") GONE!!! %upper( "%1") GONE!!!

When one of the people leave the room, I just see "GONE!!! GONE!!!" but not the person's name.
Is there anyway I could improve this so I could see the persons name also?
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sat Sep 17, 2011 3:17 am   
 
You're not capturing the name of the person. Any part of a trigger pattern that you want to be captured to %1, %2, etc. needs to be in parentheses. The corrected trigger pattern would be
Code:
^({@enemies}) has just walked

Reply with quote
Sogdog
Newbie


Joined: 11 Dec 2007
Posts: 8

PostPosted: Sat Sep 17, 2011 3:29 am   
 
Thank you for the quick and helpful answer!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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