Buttons and Functions β
A button runs a function. A function is a list of actions.
That is the core idea of 1Click Maker. This page explains the three kinds of functions and when to use each.
A button is a function β
When you click a button name in the panel's left column, the panel creates a function with the same name. In-world, *FUNCTIONS listens for clicks: when a prim named button_red is clicked, it looks for a function called button_red and runs it.
There is nothing else to wire up. The name is the link.
Names must match exactly
If you rename a prim in Second Life, re-scan and either rename the function to match or create a new one. Spaces at the beginning or end of a prim name are ignored, so btn1 and btn1 are the same button.
The three kinds of functions β
| Kind | Created by | Triggered by | Typical use |
|---|---|---|---|
| Button function | Clicking a button name in the left column, or drawing a button in UI Mode | A click on that prim (or UI area) | Almost everything |
| Event function | The + in the Events row | Something happening in-world: attach, walk, jump, water, a command⦠| AO-like behavior, startup, cleanup |
| Helper function | The + next to Functions | Another function, through the Activate Function action | Shared logic, memory savings |
Button and event functions are associative: their name ties them to a trigger. Helper functions have no trigger of their own; they only run when called.
Why helper functions matter β
Imagine 50 color buttons that all do the same three things (play a click sound, change the color, show a message) and only differ in the color. Two options:
- Without helpers: 50 functions Γ 3 actions = 150 actions to maintain. Change the sound and you edit 50 functions.
- With a helper: one helper
fx_clickwith the sound and the message. Each button has 2 actions: Activate Function β fx_click and Color. Change the sound once.
Helpers also save memory, because each action is stored once.
Details and a walkthrough in Helper Functions.
The function card β
Each function in the panel shows its name, the share of project memory it uses, and buttons to edit, clone and delete it. Event functions show the event's name, and UI Mode buttons carry a small layout icon.
Related pages β
Creating a Button From a linked prim to a working function.
Helper Functions Reusable blocks of actions.
Cloning Functions Copy a configured function to many buttons.
Events Functions that run without a click.