Re: [CODE] [NEWBIE] Non-instantaneous commands

From: Stephen Wolfe (siv@CYBERENET.NET)
Date: 08/07/98

> try wait_state state creates a delay between when character commands are
interpreted by the, a character cannot execute another command
until the wait state is up..what Urion wants is an event system..get
dg_events off of the ftp site, then you can create an event like so:

struct hw_obj
  struct char_data *ch;

  struct hw_obj *hw;

  send_to_char("Hello\r\n", ch);

  CREATE(hw, struct hw_obj, 1);
  hw->ch = ch;
  add_event(2, world, hw);

  struct hw_obj *hw = (stryuct hw_obj *) event_object;

  send_to_char("World\r\n", hw->ch);


that's basically the format for events..i use them as replacements for all
of the loops like erwin posted a while ago..and all of that other good

uh..needless to say, that was all psuedo code that may not work depending
on the actual format of the dg_event package (i extracted parts of it from
the original dg code before this patch was avaiable, so i don't think mine


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST