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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Wrens
Novice


Joined: 01 Jun 2003
Posts: 32
Location: USA

PostPosted: Mon Nov 20, 2006 5:22 am   

Expression trigger
 
In ZMUD, there was a nice little trigger that helped count down the seconds for roundtime. @roundtime > 0 as long as the roundtime varible was greater than 0, it would go to a second state and wait 1000ms, then subtract a second from roundtime. I can't seem to get this to work in CMUD. Any suggestions?
Reply with quote
Tech
GURU


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

PostPosted: Mon Nov 20, 2006 5:55 am   
 
If you post the trigger, we may be able to help.
_________________
Asati di tempari!
Reply with quote
Wrens
Novice


Joined: 01 Jun 2003
Posts: 32
Location: USA

PostPosted: Mon Nov 20, 2006 12:38 pm   
 
I was unable to figure out how to get the trigger to export into a nice text format. I went back to Zmud to get this.

#TRIGGER (@roundtime>0) {} "DragonRealms"
#COND {} {#ADD roundtime -1} {wait|param=1000}

This should be pretty much how it looks in CMUD. As near as I can tell it isn't triggering. As a side note, is there a way to export from CMUD into a nice text format. I exported to XML, but used around 100 charaters to show the above, and was in greek to me.

Thanks
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Nov 20, 2006 2:37 pm   
 
Wouldn't the #alarm command work for this?

#alarm {1} {#if (@roundtime > 0) {#add roundtime -1} {#echo Roundtime Expired!}}

or something?

Btw, XML is supposed to be in a format that makes sense to CMUD - it stops it garbling very complicated scripts, which was a problem with zMUD's txt export. Though now I think about it, since the new format will compile, won't it also export to .txt a little more reliably?
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Nov 20, 2006 3:57 pm   
 
Your trigger:
Code:
#TRIGGER (@roundtime>0) {} "DragonRealms"

will fire in CMUD whenever the @roundtime variable is changed. However, in CMUD right now you can't have expression triggers in multi-state triggers...it doesn't fire the other states properly.

Also, I noticied the the #COND command doesn't work properly when the pattern is empty. It thinks this is the ID field for the #COND instead of a blank pattern. I've added both of these issues to the bug list.
Reply with quote
Wrens
Novice


Joined: 01 Jun 2003
Posts: 32
Location: USA

PostPosted: Tue Nov 21, 2006 3:02 am   
 
Thanks tell me when I can try again.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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