Script Classes for Adventure Games/Global Variables
Author: Jeff Stephenson
- 1 Global Variables
- 1.1 ego
- 1.2 curRoom
- 1.3 userFont
- 1.4 cast
- 1.5 quit
- 1.6 addToPics
- 1.7 debugOn
- 1.8 sounds
- 1.9 inventory
- 1.10 theGame
- 1.11 regions
- 1.12 curRoomNum
- 1.13 prevRoomNum
- 1.14 newRoomNum
- 1.15 showStyle
- 1.16 aniInterval
- 1.17 speed
- 1.18 timers
- 1.19 score
- 1.20 possibleScore
- 1.21 theCursor
- 1.22 normalCursor
- 1.23 waitCursor
- 1.24 smallFont
- 1.25 lastEvent
- 1.26 modelessDialog
- 1.27 bigFont
- 1.28 volume
- 1.29 version
- 1.30 locales
- 1.31 curSaveDir
- 1.32 aniThreshold
- 1.33 perspective
- 1.34 features
- 1.35 sortedFeatures
- 1.36 useSortedFeatures
- 1.37 egoBlindSpot
- 1.38 overlays
- 1.39 doMotionCue
- 1.40 systemWindow
- 1.41 lastSysGlobal
Global variables 0 through 49 are reserved for use by the system classes. Game-specific global variables start at 50. The following global variables are defined by the system. For up to date global list see s:system.sh.
The ID of a static instance of class Ego defined in game.sc. This is the protagonist of the game.
The ID of the current Room.
The number of the font to be used in Print statements, etc. Default is 1. Set it to the font you wish to use in the init: method of your Game, or change it at will in the game.
The ID of a Set of Actors and Egos which constitutes the characters on the screen.
The main loop of the game isso setting quit to TRUE breaks out of the main loop and terminates the game.Code:(while (not quit) (theGame doit:) (Wait speed) )
A Set of PicViews which have been added to the current picture.
A generic debugging flag. I usually have a Debug menu item to set it, and trigger any debug display that I want off of it, rather than creating a special trigger whenever I want to debug something.
The Set of Sounds currently playing.
The ID of the Inventory class or instance which is the Set of all InvItems (inventory items) in the Game. Inventory related issues are not well defined yet...
The ID of the Game instance.
The Set of Regions currently in effect.
The number of the current Room.
The number of the previous Room. (So you know how you got where you are.)
Used by a Room to signal to the Game that it should change to a new Room.
The global style for the transition from one picture to another. This may be overridden by the style property of a given room. See the DrawPic kernel function for the possible styles.
The number of ticks it took to do the last animation cycle. This is used to test animation speed on a particular machine.
The number of ticks between animations. This is set, usually as a menu option, to determine the speed of animation. The default is 6.
The List of timers in the game.
The player's current score.
The games highest possible score.
The number of the current cursor.
Number of normal cursor form.
Cursor number of "wait" cursor.
Small font for save/restore, etc.
The last event (used by save/restore game).
The modeless Dialog known to User and Intrface.
The number for a large font.
Sound volume on supported machine.
The SCI version string.
Set of current locales.
Address of current save drive/directory string.
The Player's viewing angle. This is set according to the Rooms picAngle property. Degrees away from vertical along y axis.
Locations that may respond to events.
The features and cast sorted by "visibility" to ego.
If TRUE enable cast & feature sorting.
Used by sortCopy for sortedFeatures to exclude actors behind ego within angle from straight behind. Default zero is no blind spot.
The overlay List.
A motion cue has occured - process it. The Games doit method gives the motionCue: message to each element of the cast if this is set to TRUE.
ID of standard system window. If you wish to supply your own window for system messages set this to the ID of your window.
Defines the end of Global variable space.