Go to the first, previous, next, last section, table of contents.

Unit Forms

The basic unit form creates or modifies a unit.

Form: unit id [ type ] properties...

This form defines a unit. If a numeric id is supplied and matches the id of an existing unit, then that unit will be modified by properties, and the optional type will be interpreted as a new type for the unit. Otherwise a new unit will be created, with either id as its id or a arbitrarily-selected one if id is already in use. If the unit's id is newly-generated and no type has been specified, then type #0 (first-defined type) will be the type of the unit. An id of 0 can never match an existing unit id, so effect will be as if it had been omitted.

Form: unit-type-name x y [ side-id ] properties...

This is an abbreviated form, in which the x,y position is required, and an optional side id may be included. The side id will come from unit-defaults if not specified. The unit-type-name may be any valid unit type name or defined name. This form always results in a new unit.

Since there may be many units whose properties are similar, there is a "default unit" whose properties fill in missing properties in individual unit declarations.

Form: unit-defaults [ modifier ] properties...

This form sets the default values for all subsequent units read in, in this and every other module not yet loaded. The set of defaults is additive, so for instance you can repeatedly change the default side of units. If the symbol reset has been supplied for the optional modifier, then all the defaults will be changed to the basic default values, as described in this manual.

Symbol: reset

This is the symbol used to reset unit defaults; see above.


Go to the first, previous, next, last section, table of contents.