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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
jed
Adept


Joined: 18 Dec 2005
Posts: 246

PostPosted: Wed Dec 29, 2010 5:40 am   

#waitsignal timeout help
 
so in one alias I have

Code:
#waitsignal heftidentified 1500 {foodpackcurrentweight=@itemheft;#say The foodpackcurrentweight of this item is @foodpackcurrentweight} {#say The heft check trigger didn't fire within the alloted time}

According to the help file the syntax is
Code:
#WAITSIG signal timeout {match-commands} {timeout-commands}

So I've got #signal heftidentified in a trigger that is turned on by #t+ earlier in the alias above. I should be able to run my alias, wait 1500miliseconds for #signal heftidentifed to be set in the armed triggers, if within that 1500 ms it should execute
Code:
foodpackcurrentweight=@itemheft;#say The foodpackcurrentweight of this item is @foodpackcurrentweight
and if it doesn't see #signal set to heftidentified by the end of 1500 miliseconds, it should #say the heft check trigger didn't fire within the alloted time. this isn't occuring. any idea why? do I have my syntax wrong for the 1500ms wait time?
Reply with quote
jed
Adept


Joined: 18 Dec 2005
Posts: 246

PostPosted: Wed Dec 29, 2010 6:07 am   
 
So I figured out my problem. Turns out, after you set the signal you have to reset the signal for use next time. sooo in my triggers, where I had the #signal heftidentified line, i added another line below it, #signal heftidentified 0 which reset the signal.
Might not be bad to add this to the help file.
Reply with quote
Moo
Apprentice


Joined: 10 Apr 2009
Posts: 145

PostPosted: Thu Dec 30, 2010 4:55 pm   
 
I think you should also be able to make your script using a multistate trigger, rather than using signals.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Dec 31, 2010 4:20 am   
 
I don't think you have to "reset" the signal. I of just tried your code from the command line of a blank session, ran it several times and it worked each time. I think something else is going on.
_________________
Asati di tempari!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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