EventList class | misc.t[1017]

An "event list." This is a general-purpose type of script that lets you define the scripted events separately from the Script object.

The script is driven by a list of values; each value represents one step of the script. Each value can be a single-quoted string, in which case the string is simply displayed; a function pointer, in which case the function is invoked without arguments; another Script object, in which case the object's doScript() method is invoked; a property pointer, in which case the property of 'self' (the EventList object) is invoked with no arguments; or nil, in which case nothing happens.

This base type of event list runs through the list once, in order, and then simply stops doing anything once we pass the last event.

`class EventList : Script`

Superclass Tree (in declaration order)

`EventList`
`Script`
`object`

Subclass Tree

`EventList`
`CyclicEventList`
`ExternalEventList`
`RandomEventList`
`ShuffledEventList`
`StopEventList`
`SyncEventList`

Global Objects

(none)

Summary of Properties

`curScriptState eventList eventListLen`

``

Summary of Methods

`advanceState construct doScript doScriptEvent scriptDone`

Inherited from `Script` :
`getScriptState`

Properties

`curScriptState` OVERRIDDEN | `misc.t[1034]`

by default, start at the first list element

`eventList` | `misc.t[1021]`

the list of events

`eventListLen` | `misc.t[1024]`

cached length of the event list

Methods

`advanceState ( )` | `misc.t[1027]`

advance to the next state

`construct (lst)` | `misc.t[1018]`

no description available

`doScript ( )`OVERRIDDEN | `misc.t[1037]`

process the next step of the script

`doScriptEvent (evt)` | `misc.t[1060]`

carry out one script event

`scriptDone ( )` | `misc.t[1103]`

Perform any end-of-script processing. By default, we advance the script to the next state.

Some scripts might want to override this. For example, a script could be driven entirely by some external timing; the state of a script could vary once per turn, for example, or could change each time an actor pushes a button. In these cases, invoking the script wouldn't affect the state of the event list, so the subclass would override scriptDone() so that it does nothing at all.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3