Small Logo

Slow Glass Built-in Variables

The Slow Glass scripting language includes variables that are created automatically - you do not have to use make to create them, and their value may be different each time you use them.

I have adopted the convention that built-in variables are all upper-case and suggest that you use lower case for all other names.

The following built in variables are supported:

Current Time Information

The following variables conatin a string either “yes” or “no” (this can be used directly in an IF statement, e.g. IF $MORNING.

(See also $SUNANGLE below)

Current Date Information

Note that the season variable will be set to “autumn”, NOT “fall”.

Further “yes” / “no” variables:

Location Information

The $SUNANGLE built-in variable can be used for instance to drive the brightness of the screen. Note that the calculation only has a resolution of 1 hour so testing it more frequently is not helpful. Instead, you can use a duration to interpolate changes over the hour, for example:

every 1 hour ` DARKEN background to ($SUNANGLE * some_factor) in 60 minutes`

Timing Information

Randomness

Drawing Canvas Information

(All of this is subject to change as I’m figuring out how to best manage scaling for screen and canvas)

Scene Information

System Information

Resource Information

All of the following contain a space separated list of resource names.

User Variables

Previous

Introduction

Up Level

Sprite Variables

Next