Index · Editor · Blocks · Areas · Entrances · Game/Zone · Scripts/Reference · Tools · Shortcuts


[ ] NuggED: Zone

A "zone" is any playable region within the game. It is almost
synonymous with "level" or "world" in the classic videogame sense,
except one game "world" may be split across many zones.
Zones contain blocks, areas, and entrances. They also have
discrete "levels" in the z-plane defined by depth and background color.

[Zone]

 

List of Zone Properties
Accessible from the Zone menu or Ctrl+P.

Zone ID
Every zone requires a unique, lowercase, alphanumeric ID. This is mainly
used in scripts when warping between zones. Every game file
requires one zone named "first". This is where the player begins upon
starting a new game or playing for the first time.

Full Zone Name
An optional alternate name for the zone (more descriptive or informal
than its ID). This does not affect gameplay. It may be useful in future versions.

Persist Tag
This is an obsolete property. Zones with the same persist tag (arbitrary
alphanumeric keyword) may have identical blocks which maintain their current
positions and attributes between zone warps. See the persist property on the
blocks page. Use of the persist tag is no longer recommended!

Notes
Optional text field to store your own notes. Does not affect gameplay.

X, Y Limits
Defines the boundaries of the zone in game x/y coordinates. The player and
other dynamic blocks will die outside of this range. Each entry should
be a comma-separated pair of values, ie. xmin,xmax and ymin,ymax.
Default x limits are −1100 to 1100, default y limits are −100 to 1100.
The zone boundary is indicated by a black outline in the editor.

Zone Music, Volume
Specifies what music should be played in the zone. Currently, only
the Ogg Vorbis file format is supported. The filename should be relative
to the path of the game file itself.
Volume may be specified (0 to 100, default 100).
Both may be changed during gameplay via the music command.

Default Zoom, Gravity
You may optionally specify the zone's camera zoom (default 100) and
gravity for dynamic blocks (default 1.0). May be changed via scripts
using the camera and setgrav commands.

Zone Scripts

Start
Every zone has one script which will be triggered automatically upon
loading the zone. Besides cutscenes, this is also useful for
setting colors, flags, properties, reset points, etc.

Death
Similarly, every zone has one script which will be triggered when the
player dies. This is usually left blank, and the player simply resets
to a checkpoint when he dies. If you want additional things to happen,
you can fill in the death script. If a custom death script is used,
the player will not automatically reset to a checkpoint,
and the player death count will not be automatically incremented!
Therefore, every death script should safely end with die, warp,
or reloadzone, and usually adddeath is called too.

Other Zone Assets

Levels
In this game, the player can "leap" between various z-depth planes
called "levels". A level must be defined for each z-depth that the player
can access. They only have a few properties (z depth, background color,
unlocked flag) which can be edited in the sidebar when no other objects
are selected. The color and unlocked state can be changed in scripts by
the setzone and lock/unlock commands.

ZFlags
Every zone provides 32 general purpose ZFlags which can be set/unset
via scripting. They are usually used to keep track of events or progress,
and then conditionally execute sub-scripts using ifset or if zsum.
ZFlags are indexed 0 to 31, and unlike GFlags are not persistent;
they are all unset and forgotten when the player enters another zone.
(Using the ZFlag editor [F8] you can assign descriptive names to each
one to assist you in picking ZFlag numbers while in the script editor.)

ZInt
Similar to ZFlags, each zone provides a general purpose integer (32-bit)
for scripting purposes. It can be incremented, decremented, or changed
by the set zint command, and checked with if zint. It is also reset
when the player enters a new zone. There is currently no
game-wide "GInt" complement similar to GFlags/ZFlags.



Index · Play Nugget · grudlux.com