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
croman
Newbie


Joined: 17 May 2002
Posts: 7

PostPosted: Fri May 17, 2002 4:27 am   

Help with Trigger and Variable
 
I would have thought that this would have been easy, but for some reason I can not figure out what is happening.

I simply want to have a Variable that increases by 1 everytime I get a critical hit on the MUD. I know that I get a crit when I see the words "You fataly wound"

I then want it to use this Variable to create my new title.

So I first created a @crit variable that equals 0 to start off

I created a Tigger that does the following
#action {You fataly wound} {#ADD crit 1;title @crit}

This should have the crit variable start at 0, then when it sees the crit message of the mud, add 1 to the variable and post it as my title

The problem is that everytime, it actually adds 2. I have no clue why. Just testing I will flash the message and then look at the variable and it always adds 2 to it. It goes from 0 to 2 to 4, etc..

Any help is appreciated

Thanks
Reply with quote
dacheeba
Adept


Joined: 29 Oct 2001
Posts: 250

PostPosted: Fri May 17, 2002 4:59 am   
 
Reply I tested your trigger exactly, and it worked fine for me. The only thing I can think of is maybe you have the trigger in your settings two times, and forgot to delete one.Click on the Settings tab and then type 'fataly' in the search box, and hit the Filter button. Make sure you are viewing All Classes.

Other than that, maybe your mud output is different, or some other script is adding to your variable. Really all you can do is sort though all your triggers and check to see whats causing it yourself, because the script you gave us works as it should.
Reply with quote
croman
Newbie


Joined: 17 May 2002
Posts: 7

PostPosted: Fri May 17, 2002 1:13 pm   
 
I only have 3 triggers and this is also my first variable so there is not alot to search through :)

I even went onto another character that had nothing (no triggers, aliases, etc) and set it up there and it did the same thing.

Maybe my mud is doing something wierd.. I will continue to play with it.

Thanks
Reply with quote
Pega
Magician


Joined: 08 Jan 2001
Posts: 341
Location: Singapore

PostPosted: Fri May 17, 2002 7:28 pm   
 
If I'm not mistaken from previous experience, a trigger can fire twice on the same line if the trigger fires both on new line and prompt. If for some reason there is a prompt (pause) somewhere after the pattern, and then more text added to the line before the end of the line. Maybe all it needs is a pause of a few hundred milliseconds.
I'm not sure because I scripted on two different programs recently. :-b
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