/function
In SandboX editing mode: creates a function (checkpoint, teleport, timer, vehicle, message, menu, camera...) that runs when a call runs it: /function [type]
What it does
The main building command: /function [type]. You must be in editing mode (/editsandboxset).
Type just /function and a Choose Function Type... menu lists every type to pick from.
- type is a two-letter code. /functiontypes lists them, and the SandboX page explains each one.
- A function does nothing until a call runs it:
/call start [number]when the set starts, or/call [function number] [condition] [number]when something happens to another function.
The function gets the next free function number (1-99). Positions come from where you stand (or sit) when you finish it.
Most types then ask for their settings in dialogs:
| Type | Asks for |
|---|---|
CM TD GT messages | The text |
TP teleport | "Allow Vehicles?" |
TI timer | Shown or invisible, then the time |
PS sound | The sound ID, then "At my Location" or "Play for player" |
SV vehicle | Sit in the vehicle first, then "Current Location" or "Spawn Vehicle for Player" |
SH health | 0-100 |
GG gun | The weapon and ammo |
DF destroy | The function number to undo |
SP pickup | The pickup, its ammo, and sometimes "Use Pickup Attribute?" |
EX explosion | "Current Location" or "Explode Player" |
CC camera | Opens the camera editor |
CD dialogue | Opens the dialogue editor |
CO object | The model number (it goes 10 m in front of you; move it with /eso, /eso2 or /so2) |
MO move object | The CO function, then move the object to its end (/eso, /eso2, /so2) and type /moveend; the speed; only there, there and back, or over and over |
OH object health | The CO function, its health, and whether to show it |
ZN zone | Circle (a radius) or rectangle (walk to the other corner and type /zc), then every height or a bottom and top |
LS LV LH sets | The set's name (LV: then the SV function; LH: then who is involved) |
CP checkpoint, FP freeze, DI disarm | Nothing more |
Almost every type ends with "Who is involved in this function?": All Players, Trigger Player, a team, and so on.
When it's made: "\ You created function number 5 (Checkpoint) where you are standing."* (green), the game text FUNCTION CREATED... NUMBER 5 [CP], and yellow lines with what to do next: /call start 5, /call <FunctionNumber> <Condition> 5, /conditions 5 (for functions that have conditions), /editfunction 5 and /deletefunction 5.
Mistakes: "\ Sorry, "XX" is not a function type. Type /function for the menu or /functiontypes for the list."*
Example: /function CP puts a checkpoint where you stand; /call start 1 (its ID) shows it as soon as the set starts.
Short form: /func.
Wiki