Skip to main content

call_out

Discworld driver help

call_out

Name

call_out() - delayed function call in same object

Synopsis

void | int call_out( string | function fun, int delay, mixed arg, ... );

Description

Set up a call to `fun'. If fun is a string, it is interpreted as the name of a function in this_object(). The call will take place `delay' seconds later, with the arguments `arg' and following provided.

Notes

Unless THIS_PLAYER_IN_CALL_OUT is defined, you can't rely on write() or say() in 'fun' since this_player() is set to 0. Use tell_object() instead.

If THIS_PLAYER_IN_CALL_OUT is defined, this_player() is the same as it was when the call_out() call was scheduled.

The return value will be a unique integer identifying the call_out, if CALLOUT_HANDLES is defined. This 'handle' can be passed to remove_call_out() and find_call_out().

The driver Discworld uses has THIS_PLAYER_IN_CALL_OUT and CALLOUT_HANDLES defined.

Examples

call_out( "modify_short", 5 );

See also

remove_call_out(3), call_out_info(3)