Re: timers

From: John (witpens@optushome.com.au)
Date: 12/07/01


From: "Sam Moggach" <micken69@HOTMAIL.COM>


>    Hello, i was just wondering about timers. i have seen on some muds
fight
> timers that do not allow you to quit while you have a fight timer. i
was
> wondering how those work because for my mud i need to have a timer
between
> commands inputted during a fight. so you input a command, and anything
you
> input after that that has been declared a fight command will not go
through
> until the given time has elapsed. i hope to make these timers go as
fast as
> 0.5 seconts.

It's called WAIT_STATE. Usually, WAIT_STATE uses PULSE_VIOLENCE as the
amount to count down, which equates to 2 RL_SEC. If you want anything
faster,
then do something like:-
#define HALF_SEC  (0.5 * RL_SEC)
then call  WAIT_STATE(ch, HALF_SEC);

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/24/03 PDT