HintOpener class | hintsys.t[32]

HintOpener provides some properties common to Goal and ExtraHint, in particuar those relating to opening and closing Goals and ExtraHints.

`class HintOpener : object`

Superclass Tree (in declaration order)

`HintOpener`
`object`

Subclass Tree

`HintOpener`
`ExtraHint`
`Goal`

Global Objects

(none)

Summary of Properties

`closeWhen closeWhenAchieved closeWhenExamined closeWhenKnown closeWhenMoved closeWhenRevealed closeWhenSeen closeWhenTrue openWhen openWhenAchieved openWhenExamined openWhenKnown openWhenMoved openWhenRevealed openWhenSeen openWhenTrue`

Summary of Methods

``

(none)

Properties

`closeWhen` | `hintsys.t[164]`

Determine if there's any condition that should close this goal. We'll check closeWhenSeen, closeWhenDescribed, and all of the other closeWhenXxx conditions; if any of these return true, then we'll return true.

`closeWhenAchieved` | `hintsys.t[95]`

An optional Achievement object that closes this goal. Once the achievement is completed, this goal's state will automatically be set to Closed. This makes it easy to associate the goal with a puzzle: once the puzzle is solved, there's no need to show hints for the goal any more.

`closeWhenExamined` | `hintsys.t[59]`

close the goal when the given object is described

`closeWhenKnown` | `hintsys.t[107]`

an optional Topic or Thing that closes this goal when known

`closeWhenMoved` | `hintsys.t[76]`

An optional object that, when moved, closes this goal. Many goals will be things like "how do I find the X?", in which case it's nice to close the goal when the X is found.

`closeWhenRevealed` | `hintsys.t[117]`

an optional <.reveal> tag that closes this goal when revealed

`closeWhenSeen` | `hintsys.t[50]`

An option object that, when seen by the player character, closes this goal. Many goals will be things like "how do I find the X?", in which case it's nice to close the goal when the X is found.

`closeWhenTrue` | `hintsys.t[131]`

an optional general-purpose check that closes the goal

`openWhen` | `hintsys.t[149]`

Determine if there's any condition that should open this goal. This checks openWhenSeen, openWhenDescribed, and all of the other openWhenXxx conditions; if any of these return true, then we'll return true.

Note that this should generally NOT be overridden in individual instances; normally, instances would define openWhenTrue instead. However, some games might find that they use the same special condition over and over in many goals, often enough to warrant adding a new openWhenXxx property to Goal. In these cases, you can use 'modify Goal' to override openWhen to add the new condition: simply define openWhen as (inherited || newCondition), where 'newCondition' is the new special condition you want to add.

`openWhenAchieved` | `hintsys.t[86]`

An optional Achievement object that opens this goal. This goal will be opened automatically once the goal is achieved, if the goal was previously undiscovered. This makes it easy to set up a hint topic that becomes available after a particular puzzle is solved, which is useful when a new puzzle only becomes known to the player after a gating puzzle has been solved.

`openWhenExamined` | `hintsys.t[56]`

this is like openWhenSeen, but opens the topic when the given object is described (with EXAMINE)

`openWhenKnown` | `hintsys.t[104]`

An optional Topic or Thing that opens this goal when the object becomes "known" to the player character. This will open the goal as soon as gPlayerChar.knowsAbout(openWhenKnown) returns true. This makes it easy to open a goal as soon as the player comes across some information in the game.

`openWhenMoved` | `hintsys.t[69]`

An optional object that, when moved, opens this goal. It's often convenient to declare a goal open as soon as the player enters a particular area or has encountered a particular object. For such cases, simply set this property to the object that opens the goal, and we'll automatically mark the goal as Open the next time the player asks for a hint after seeing the referenced object.

`openWhenRevealed` | `hintsys.t[114]`

An optional <.reveal> tag name that opens this goal. If this is set to a non-nil string, we'll automatically open this goal when the tag has been revealed via <.reveal> (or gReveal()).

`openWhenSeen` | `hintsys.t[42]`

An optional object that, when seen by the player character, opens this goal. It's often convenient to declare a goal open as soon as the player enters a particular area or has encountered a particular object. For such cases, simply set this property to the room or object that opens the goal, and we'll automatically mark the goal as Open the next time the player asks for a hint after seeing the referenced object.

`openWhenTrue` | `hintsys.t[128]`

An optional arbitrary check that opens the goal. If this returns true, we'll open the goal. This check is made in addition to the other checks (openWhenSeen, openWhenDescribed, etc). This can be used for any custom check that doesn't fit into one of the standard openWhenXxx properties.

Methods

(none)

Adv3Lite Library Reference Manual
Generated on 02/05/2024 from adv3Lite version 2.0