OneTimePromptDaemonclass | events.t[523] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
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
OneTimePromptDaemon
PromptDaemon
Event
object
Inherited from PromptDaemon
:
isPromptDaemon
Inherited from Event
:
captureText
eventOrder
executed
interval_
nextRunTime
obj_
prop_
senseObj_
senseProp_
Inherited from Event
:
callMethod
construct
delayEvent
eventMatches
getNextRunTime
removeEvent
executeEvent ( ) OVERRIDDEN | events.t[524] |