ExtraHintclass | hintsys.t[761] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
The ExtraHint class provides a framework for providing players (especially novice players) with extra hints, nudges, and tips during the course of play. When it is activated (either at player request, or because the player appears to be having trouble), a hint or tip can be displayed at the end of the turn in response to what the player has just typed, or some condition that has just become true, or which became true a certain number of turns ago.
It is also possible to define conditions (typically the achievement of some goal) that render a particular ExtraHint otiose, so that it is not displayed if it is no longer needed.
We simply need to define objects of the ExtraHint class to encapsulate the extra hints we want displayed.
A series of ExtraHints can be defined using a template if desired.
The first (optional) element in the template (e.g. ->doorAchievement) is the achievement we check to see if this ExtraHint has become redundant. For example, if the player has already taken the flyer, flyer.achievement has been achieved, and so we don't need this first ExtraHint.
The second (optional) element in the template (e.g. +1) is the hintDelay; this is number of turns that should elapse between the openWhen condition (see below) becoming true and the hint being offered. This optionally allows the player a few turns to work on the solution before being offered a gratuitous hint.
The third element in the template is simply the text of the extra hint to display.
The openWhen property holds the condition that must be true before this ExtraHint is displayed. In the case of the first ExtraHint, the condition is that the player char has visited the location that contains the telephone pole.
class
ExtraHint : HintOpener
ExtraHint
HintOpener
object
hintDelay
hintDone
hintText
location
openedWhen
priority
Inherited from HintOpener
:
closeWhen
closeWhenAchieved
closeWhenExamined
closeWhenKnown
closeWhenMoved
closeWhenRevealed
closeWhenSeen
closeWhenTrue
openWhen
openWhenAchieved
openWhenExamined
openWhenKnown
openWhenMoved
openWhenRevealed
openWhenSeen
openWhenTrue
checkClose
doHint
setDelay
showHint
hintDelay | hintsys.t[778] |
hintDone | hintsys.t[856] |
hintText | hintsys.t[814] |
location | hintsys.t[762] |
openedWhen | hintsys.t[859] |
priority | hintsys.t[865] |
checkClose ( ) | hintsys.t[768] |
doHint ( ) | hintsys.t[791] |
setDelay (val) | hintsys.t[846] |
showHint ( ) | hintsys.t[817] |