Head Ball (teardown)

''This is a teardown page explaining the details and inner workings of this agent. For general information, see Head Ball''

The Head Ball is a simple toy agent created by Mark Ashton for Docking Station. The sprite is based on a subset of the sprites for the Chichi Norn head. The head is capable of blinking every few seconds, and ov00 is used as an object variable to change the expressions on the head, from "normal", to "happy", to "shocked", "angry", "miffed" and "down". The head can also vocalise its reactions to being thrown about. To directly see the code and files, Revelation, Zeus or Jagent can be used to decompile the agent file.

Inject

 * Sets the BHVR to 43 (Creatures can push, pull, hit and pick up this agent)
 * Moves the agent safely to either near the DS creator or a safe C3 location
 * A random tick is established between 1 and 4 seconds.
 * SETS is used to set ov00 to "normal" - the use of SETS allows the use of names, rather than numbers for the expressions the head ball can take.

Activate 1 (1)

 * Commands are executed instantly
 * Stims the creature with played with toy (97)
 * Gives a random velocity in the left-right direction, and a bounce directly upwards.

Activate 2 (2)

 * Commands are executed instantly
 * Stims the creature with played with toy (97)
 * Gives a random velocity in the left-right direction, and a bounce directly upwards.

Hit (3)

 * Commands are executed instantly
 * Stims the creature with played with toy (97)
 * Gives a random velocity in the left-right direction, and a bounce directly upwards.

Pickup (4)

 * Commands are executed instantly
 * ov00 is set to the string "happy"
 * The BASE pose of the agent is set to 2, which is an eyes-open, very happy face.
 * A giggling noise (gig2.wav) is played.
 * Stims the creature with played with toy (97)

Timer (9)

 * Commands are executed instantly
 * ANIMates a blink for the head ball, in whatever expression it's holding.
 * If it's not falling and the expression isn't "normal", ov00, the base, and the pose are all reset to normal, 0 and 0, respectively. (that is, normal).

Collision (6)

 * Commands are executed instantly
 * If the face is "normal", change the expression to "shocked" and play an "ouch!" sound (ow2!.wav)
 * Else, if the face is "happy", change the expression to "shocked" and play an "ouch!" sound (ow2!.wav)
 * Else, if the face is already "shocked", change the expression to "angry" and play a different "ouch!" sound (ow1!.wav)
 * Else, if the face is already "angry", change the expression to "miffed" and play a different "ouch!" sound (ow3!.wav).
 * Else, if the face is already "miffed", change the expression to "down".
 * Make the head open its eyes.

Remove

 * Removes all instances of the head ball.