Get 1Click Maker

Creating a Button โ€‹

In Prim Mode every linked prim with a name can be a button. Here is the full path from a prim to a working click.

Requirements โ€‹

  • The HUD is rezzed on the ground with *BUILD and *FUNCTIONS inside.
  • The panel is open. (No project yet? See the Quickstart.)

Steps โ€‹

  1. Create the prim that will be the button and link it to the HUD. The HUD's main prim must be the root (select it last before Ctrl+L).

  2. Name the prim. Use the Second Life build tool โ†’ General tab โ†’ Name. Pick something that says what the button does: button_texture_1, btn_color_blue, play_sound.

  3. Re-scan in the panel's left column. The new prim shows up in the button list.

  4. Click the prim's name in the list. The panel creates a function with that name and opens it.

  5. Add actions to the function (see Creating an Action) and Save.

  6. Build, then click the prim in-world to test.

New look

Clicking the name opens the button in the center, with nothing to confirm. Its function is created when you add the first action. The New Look

Clicking a button name creates its function.
Clicking a button name creates its function.

Naming rules โ€‹

  • The button's name is the prim's name in Second Life (up to 63 characters). Special characters are fine, but short, simple names are easier to work with.
  • Spaces at the start or end are ignored.
  • Names are case-sensitive: Btn1 and btn1 are different buttons.
  • Avoid the default Object. Ten prims called Object are ten buttons you cannot tell apart.
  • Two prims with the same name run the same function. That is sometimes useful (two physical buttons for one action) and sometimes a bug.

The root prim as a button โ€‹

The root prim (the crown ๐Ÿ‘‘ in the list) can be a button too. A single-prim HUD works: the whole object is one button. For a HUD with many buttons on one prim, use UI Mode instead.

Prims that should not be buttons โ€‹

Decorative parts, frames and backgrounds will still appear in the list. Simply do not create a function for them. To make a prim ignore clicks entirely (for example a frame that sits over a clickable area), set its Description to !ignore in the build tool.

Which face was clicked? โ€‹

*FUNCTIONS knows which face of the prim was clicked. You can use it in a condition through the system variable !touched_face, for example to make one prim behave like several buttons.

Next โ€‹