Get 1Click Maker

Targets โ€‹

A target is any object your HUD controls: a shirt, pants, shoes, a lamp, a chair, an animesh pet. The HUD sends commands; the target applies them.

How it works โ€‹

Each target carries the *TARGETS script. When you create the target, the script picks a private channel and writes it (encoded) into the object's description. When you scan targets from the panel, the HUD learns those channels. From then on, every action aimed at that target is sent on its channel and applied by *TARGETS.

text
HUD  โ”€โ”€(private channel)โ”€โ”€โ–บ  Shirt  (*TARGETS applies the texture)
     โ”€โ”€(another channel)โ”€โ”€โ–บ  Pants  (*TARGETS applies the color)

Two things follow from this:

  • Range. Commands are region-wide chat, so the target must be in the same region as the HUD. Wearing both is the normal case.
  • Ownership. Only the target's owner can command it, and it only listens to HUDs of the same owner. When your customer wears your shirt and your HUD, both belong to them and everything works.

What you can do to a target โ€‹

Any action with a Target field works on targets: Blinn-Phong and PBR textures, color, transparency, glow, full bright, alpha modes, rotation, position, size, resizer, ghost/phantom, point of light, and commands. Sounds and avatar animations are the exception: they run where the function runs, so for a target to play a sound it needs its own project (see HUD-to-Object Commands).

The special target $THIS โ€‹

Every target list starts with $THIS. It means the object running this function: the HUD itself, or, for a button function, the button prim that was clicked. Use it to change the HUD's own look (highlight the active button, flip the HUD, hide a panel) without scanning anything.

A target is a whole object. Inside it, actions pick which prims to affect by link name (and which faces). See Link Names for how naming your prims makes the same HUD work across different uploads and bodies.

Pages in this section โ€‹

Creating a Target Drop *TARGETS in an object and choose NEW.

Synchronizing Targets Make five identical shirts answer one HUD.

Listing Targets Scan nearby targets into the panel.

Link Names Name prims so actions hit the right part.

Bulk Edit Replace one target with another in every action.