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
jtviper456
Novice


Joined: 17 Jan 2003
Posts: 37

PostPosted: Wed May 26, 2004 6:22 am   

#ALARM creates triggers
 
I'm using some #ALARM to execute some commands, I run into the following problem:

#IF {@channel=1 & @fruit=1} {#ALARM +45 {kus}
#ALARM +60 {planthq}}
---
When the one alarm sets off, it creates a trigger:
Pattern: +45
Value: kus
The second alarm goes off:
Pattern: +60
Calue: planthq
---
Is there something I'm doing wrong, or possibly a program error?
Reply with quote
Vorax
Apprentice


Joined: 29 Jun 2001
Posts: 198
Location: USA

PostPosted: Wed May 26, 2004 7:08 am   
 
That's what alarms do. They create a trigger, fire once (unless set otherwise) and delete themselves. There's nothing wrong with what you've written unless you're expecting something else to happen.
Reply with quote
jtviper456
Novice


Joined: 17 Jan 2003
Posts: 37

PostPosted: Thu May 27, 2004 3:07 am   
 
I tried this again, and it did the exact same thing, it never deleted the triggers it created from the #ALARM, there was over 20 +45s and +60s in the .mud file. If this helps any, in the aliases(kus and planthq), I have them set to loop over if {@channel=1 & @fruit=1}.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu May 27, 2004 4:23 am   
 
Without seeing the aliases, there's no way to tell what the problem is. The scripts of the aliases are included in the scripts of the alarms and the alarms won't delete themselves until they've completed their entire script, including the scripts the aliases they call.

One-time alarms are designed not to overwrite other one-time alarms with the same pattern (delay). There are many instances where it's desirable to have multiple one-time alarms with the same delay, especially if the alarms do different things.
Reply with quote
jtviper456
Novice


Joined: 17 Jan 2003
Posts: 37

PostPosted: Thu May 27, 2004 5:03 am   
 
Ok. So, if the alarm isn't executed, it won't delete itself. Thanks.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Thu May 27, 2004 7:05 am   
 
Actually you CAN overwrite an alarm but you have to Name it #ALARM "NAME" {time pattern} {Value}

#IF {@channel=1 & @fruit=1} {#ALARM "kusalarm" {+45} {kus}
#ALARM "planthqalarm" {+60} {planthq}}

EDIT: Note that it is usually a good idea to name your #ALARM and #TEMP triggers to keep the exact problem you are having from happening :P
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