The Name Command


Usage

    name name

Description

The name command assigns a name to an object so that it may be referenced by an action on another object. This allows the implementation of multi-object behaviors, such as the where the clicking of one object causes another object to appear or disappear.

The name command has no effect by itself. It must be used in conjunction with actions on other objects in order to implement behaviors.

The following commands can reference by name objects other than the one they are placed on:

  • Visible - makes the object either visible or invisible
  • Solid - makes the object either solid or unsolid (i.e. un-bumpable)
  • Sign - places visible text on the object
  • Picture - displays a picture (JPEG) on the object
  • Color - assigns a new color to the object
  • Animate - runs an animation on the object
  • Frame - changes the current animation frame
  • Astart - starts a stopped animation
  • Astop - stops a running animation

Multiple objects may have the same name. In this case any actions applied to a name will affect all objects in the vicinity with that name.

Named objects built and owned by one citizen cannot be referenced by actions on objects owned by another citizen. For example, if citizen #1 owns an object with the action "create name rock", citizen #2 cannot make the object disappear by placing another object nearby with the action "activate visible rock off". For multi-object behaviors, all objects involved must be owned by the same citizen.

Example

    create name door

This creates an object with the name "door". Other nearby objects can now refer to this object using the name "door". For example, when bumped another object could make the door invisible using the action:

    bump visible door off