Scriptclass

misc.t[533]

Superclass
Tree

Subclass
Tree

Global
Objects

Property
Summary

Method
Summary

Property
Details

Method
Details

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  

curScriptState

Summary of Methods  

doScript getScriptState

Properties  

curScriptState

misc.t[565]

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 ( )

misc.t[553]

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 ( )

misc.t[538]

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