Scene class | scene.t[157], scenetopic.t[7]

A Scene is an object that represents a slice of time that starts and ends according to specified conditions, and which can define what happens when it starts and ends and also what happens each turn when it is happening.

Modified in scenetopic.t[7]:
Modifications to Scene for the SCENETOPIC EXTENSION

`class Scene : object`

Superclass Tree (in declaration order)

`Scene`
`object`

Subclass Tree

(none)

Global Objects

(none)

Summary of Properties

`endedAt endsWhen hasHappened howEnded isActive isHappening notifySingleActor recurring startedAt startsWhen timesHappened turnsActive`

Summary of Methods

`afterAction beforeAction eachTurn end notifyActors preAction start tryPreAction whenEnding whenStarting`

Properties

`endedAt` | `scene.t[193]`

The turn this scene ended at

`endsWhen` | `scene.t[168]`

an expression or method that evaluates to something other than nil when you want the scene to end

`hasHappened` | `scene.t[249]`

Flag to show whether this scene has ever happened.

`howEnded` | `scene.t[255]`

A user defined flag showing how the scene ended

`isActive` | `scene.t[187]`

Is this scene currently taking place? (Game code should treat this as read-only). We provide isActive as a read-only synonym of isHappening in case game code uses it on analogy with several other adv3Lite entities that do use an isActive property

`isHappening` | `scene.t[179]`

Is this scene currently taking place? (Game code should treat this as read-only)

`notifySingleActor` | `scenetopic.t[73]`

Flag (for use with SceneTopic extension): do we want to trigger a SceneTopic response from every actor the player char can talk to, or only the first one we find? By default we assume we want a response from only one actor. Note that the Actor notificationOrder property can be defined so that we can select which Actor this will be (the one with the lowest notificationOrder). [SCENETOPIC EXTENSION]

`recurring` | `scene.t[174]`

Normally a scene will only occur once. Set recurring to true if you want the scene to start again every time its startsWhen condition is true.

`startedAt` | `scene.t[190]`

The turn this scene started at

`startsWhen` | `scene.t[162]`

An expression or method that evaluates to true when you want the scene to start

`timesHappened` | `scene.t[252]`

The numbter of times this scene has happened.

`turnsActive` | `scene.t[272]`

The number of turms this Scene has been active. Is this Scene is not happening, return -1.

Methods

`afterAction ( )` | `scene.t[267]`

This method is called on every active Scene just after an action has taken place. By default we do nothing here.

`beforeAction ( )` | `scene.t[261]`

This method is called on every active Scene just before an action is about to take place. By default we do nothing here.

`eachTurn ( )` | `scene.t[246]`

Routine to execute every turn this scene is in progress.

`end ( )` | `scene.t[218], scenetopic.t[11]`

The method executed when this Scene ends. Game code should normally override whenStarting() rather than this method.

Modified in scenetopic.t[11]:
Modified for SceneTopic Extension to notify any actor that we can talk to that this scene has ended.

`notifyActors (prop)` | `scenetopic.t[32]`

Notify any actor that we can talk to that this scene has started

`preAction (lst)` | `scene.t[283]`

This method is called on each active scene before any Doers and can be used to conditionally rule out the action (by using abort or exit), for example if the player is character is tied up or otherwise incapacitated during the Scene. The lst parameter contains a list in the form [action, dobj, iobj] (or just [action] for an IAction or just [action, dobj]) and should be used to determine what the proposed action is.

`start ( )` | `scene.t[199], scenetopic.t[23]`

The method executed when this Scene starts. Game code should normally override whenStarting() rather than this method.

Modified in scenetopic.t[23]:
Modified for SceneTopic Extension to notify any actor that we can talk to that this scene has started.

`tryPreAction (lst)` | `scene.t[289]`

Service method usede internally on the library to ensure that preAction() is called only on currently active scenes.

`whenEnding ( )` | `scene.t[243]`

Routine to execute when this scene ends

`whenStarting ( )` | `scene.t[240]`

Routine to execute when this scene starts

Adv3Lite Library Reference Manual
Generated on 08/12/2025 from adv3Lite version 2.2.2