OneTimePromptDaemonclass | events.t[523]

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`
`object`

Subclass Tree

(none)

Global Objects

(none)

Summary of Properties

``

Inherited from `PromptDaemon` :
`isPromptDaemon`

Inherited from `Event` :
`captureText eventOrder executed interval_ nextRunTime obj_ prop_ senseObj_ senseProp_`

Summary of Methods

`executeEvent`

``

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

Properties

(none)

Methods

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

no description available

Adv3Lite Library Reference Manual
Generated on 12/12/2022 from adv3Lite version 1.6