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
fattony
Apprentice


Joined: 27 Dec 2001
Posts: 105
Location: USA

PostPosted: Tue Aug 06, 2002 4:47 am   

Triggering on a #show
 
I have 4 triggers that all do the same #show command. THEN, I have a trigger that fires off of that #show. As follows:

#trigger {You quietly approach a racoon. With one lunge you jump forward and snap its neck. You return from the forest gleaming with pride.} {#show Caught a racoon!}

then

#trigger {Caught a (%w)!} {hunt}

But when the second trigger fires, for some reason it sends 'hunt' twice. Any idea why?

Fat Tony
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Aug 06, 2002 1:25 pm   
 
Well, the only possibility I see is that there is another trigger that also sends hunt and fires on this. However, I'm curious, why can't you send the hunt command directly in the first trigger? There should almost never be a reason to have to fire a trigger with a #SHOW from another trigger.

Kjata
Reply with quote
fattony
Apprentice


Joined: 27 Dec 2001
Posts: 105
Location: USA

PostPosted: Wed Aug 07, 2002 12:06 am   
 
I've checked to make sure there are no other triggers with the same pattern. And the reason I have it off of the #show is because there are at least 4 different messages from the MUD for catching something. "You quietly approach..." is only one of them, I used as an example. Also, I need to be able to enable/disable the "Caught a" trigger, while leaving the 4 hunt messages always enabled. Hope that makes some sense.

I don't think it is relevant, but in case it is, the "hunt" command is an alias from zMUD.

Fat Tony
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Aug 07, 2002 12:25 am   
 
I don't see any reason why it should fire twice, but, again, you don't need to use SHOW to fire another trigger. If the problem is that there are multiple messages that should result in the same action, then put a call to the hunt alias in each trigger. If you need to be able to disable the calling of this alias, then put an if check:
#IF (@canHunt) {hunt}

You then set this variable to either 1 or 0 or you could even use a button to toggle its value.

Kjata
Reply with quote
fattony
Apprentice


Joined: 27 Dec 2001
Posts: 105
Location: USA

PostPosted: Wed Aug 07, 2002 12:42 am   
 
I see what you're saying, but that would not work in this case. I'll keep toying with it and see if I can figure it out.

Fat Tony
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Aug 07, 2002 4:29 am   
 
Why wouldn't it work? You can enable/disable an alias just as easily as a trigger, in fact you can probably use exactly the same method. And, you can still have your hunt messages, they just won't be doing anything except providing you with info.

#TR {You quietly approach a racoon. With one lunge you jump forward and snap its neck. You return from the forest gleaming with pride.} {#show Caught a racoon!;hunt}
#UNTR {Caught a (%w)!}

LightBulb
Senior Member
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