Scriptclass
Generic script object. This class can be used to implement a simple state machine.
We define Script in misc.t rather than eventList.t so that other parts of the library can safely test whether something is ofKind(Script) even it eventList.t is not present. The various types and subclasses of script are defined in eventList.t to allow them to be optionally excluded from the build if they’re not needed in a particular game.
class
Script
: object
Superclass Tree (in declaration order)
Script
` object`
Subclass Tree
Script
EventList
CyclicEventList
ExternalEventList
RandomEventList
ShuffledEventList
StopEventList
SyncEventList
Global Objects
(none)
Summary of Properties
Summary of Methods
Properties
curScriptState
Property giving our current state. This should never be used directly; instead, getScriptState() should always be used, since getScriptState() can be overridden so that the state depends on something other than this internal state property. The meaning of the state identifier is specific to each subclass.
Methods
doScript ( )
Process the next step of the script. This routine must be overridden to perform the action of the script. This routine’s action should call getScriptState() to get our current state, and should update the internal state appropriately to take us to the next step after the current one.
By default, we don’t do anything at all.
getScriptState ( )
Get the current state. This returns a value that gives the current state of the script, which is usually simply an integer.
Adv3Lite Library Reference Manual
Generated on 15/03/2023 from adv3Lite version 1.6.1