-
Notifications
You must be signed in to change notification settings - Fork 50
Manual:DIL Manual wait()
iamnove edited this page Jan 18, 2023
·
55 revisions
wait ( i : integer , dilexp ) i : Message class to accept, see SFB_* in values.h and/or vme.h dilexp : Expression that has to be TRUE or not null to accept message. result: Waits for a command, matching the flagset, and satisfies the expression. When using the 'wait()' command, the first argument is an integer, that tells what classes of messages to wait for. Each message class is represented by a bit named as described in the chapter on messages. Example:
wait (SFB_TICK|SFB_MSG, TRUE) /* Will accept a message, either from another DIL program or a timer message. As the second argument is always TRUE, any such message will reactivate the DIL program. */
Example:
wait (SFB_CMD, command("transmutate")) /* waits for an command entered named 'transmutate'. Activates the DIL program, that then can block the command, or let it pass (and then let the game produce the normal error message for unknown commands). */