Eventclass
An Event is an object such as a Fuse or Daemon that is executed according to certain conditions. Game code will normally use one of its subclasses rather than the Event class directly.
class
Event
: object
Superclass Tree (in declaration order)
Event
` object`
Subclass Tree
Event
Daemon
SenseDaemon
Fuse
SenseFuse
TimeFuse
SenseTimeFuse
PromptDaemon
OneTimePromptDaemon
Global Objects
Summary of Properties
captureText
eventOrder
executed
interval_
isPromptDaemon
nextRunTime
obj_
prop_
senseObj_
senseProp_
Summary of Methods
callMethod
construct
delayEvent
eventMatches
executeEvent
getNextRunTime
removeEvent
Properties
captureText
Text captured from callMethod()
eventOrder
Event order - this establishes the order we run relative to other events scheduled to run at the same game clock time. Lowest number goes first. By default, we provide an event order of 100, which should leave plenty of room for custom events before and after default events.
executed
Flag - has this event ever been executed
interval_
The interval at which this Event is to be executed.
isPromptDaemon
by default, we’re not a per-command-prompt daemon
nextRunTime
our next execution time, expressed in game clock time; by default, we’ll set this to nil, which means that we are not scheduled to execute at all
obj_
The object we’re associated with
prop_
A pointer to the property of that object to execute
senseObj_
If the senseObj_ property is defined (normally via our constructor), the player character must be able to sense the senseObj_ via the sense defined in senseProp_ for any textual output from obj_.(prop_) to be displayed when this Event is executed.
senseProp_
The sense via which we test whether senseObj_ can be sensed by the player character. This must be given as an appropriate property of the Query object, e.g. &canSee or &canHear.
Methods
callMethod ( )
Call the method this Event should execute when it’s ready to do so
construct (obj, prop)
Construct a new Event
delayEvent (turns)
delay our scheduled run time by the given number of turns
eventMatches (obj, prop)
does this event match the given object/property combination?
executeEvent ( )
Execute the event. This must be overridden by the subclass to perform the appropriate operation when executed. In particular, the subclass must reschedule or unschedule the event, as appropriate.
getNextRunTime ( )
Get the next run time, i.e. the next turn on which this Event should execute obj_.(prop_).
removeEvent ( )
Remove this event from the eventManager’s list of events.
Adv3Lite Library Reference Manual
Generated on 15/03/2023 from adv3Lite version 1.6.1