OneTimePromptDaemon class | events.t[853]

A one-time-only prompt daemon is a regular command prompt daemon, except that it fires only once. After it fires once, the daemon automatically deactivates itself, so that it won't fire again.

Prompt daemons are occasionally useful for non-recurring processing, when you want to defer some bit of code until a "safe" time between turns. In these cases, the regular PromptDaemon is inconvenient to use because it automatically recurs. This subclass is handy for these cases, since it lets you schedule some bit of processing for a single deferred execution.

One special situation where one-time prompt daemons can be handy is in triggering conversational events - such as initiating a conversation - at the very beginning of the game. Initiating a conversation can only be done from within an action context, but no action context is in effect during the game's initialization. An easy way to deal with this is to create a one-time prompt daemon during initialization, and then trigger the event from the daemon's callback method. The prompt daemon will set up a daemon action environment just before the first command prompt is displayed, at which point the callback will be able to trigger the event as though it were in ordinary action handler code.

`class OneTimePromptDaemon : PromptDaemon`

Superclass Tree (in declaration order)

`OneTimePromptDaemon`
`PromptDaemon`
`Event`
`BasicEvent`
`object`

Subclass Tree

(none)

Global Objects

(none)

Summary of Properties

``

Inherited from `PromptDaemon` :
`isPromptDaemon`

Inherited from `Event` :
`eventOrder nextRunTime`

Inherited from `BasicEvent` :
`obj_ prop_ sense_ source_`

Summary of Methods

`executeEvent`

``

Inherited from `Event` :
`construct delayEvent getNextRunTime removeEvent`

Inherited from `BasicEvent` :
`callMethod eventMatches`

Properties

(none)

Methods

`executeEvent ( )`OVERRIDDEN | `events.t[854]`

no description available

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3