Send Command β
Send a named command to a target that has its own project listening for it.
Some things cannot be done to a target from the outside: playing a sound from it, animating an animesh, detaching it, changing one of its variables. Send Command tells the target "run your function named X", and the target does the work with its own project.
Fields β
| Field | Required | What to enter |
|---|---|---|
Target | Yes | A scanned target. $THIS is not valid here (call a function directly instead). |
Command | Yes | The command name, up to 30 characters. Must match a Receive Command event in the target exactly (case-sensitive). |
How to set it up β
Give the target its own project:
*BUILD,*FUNCTIONSand[add-on] - Events - 1Clickinside it, rezzed on the ground. Open its panel link.In the target's project, register a Receive Command event with the command name, for example
bark, and add actions (Sound, Object Animation, Messageβ¦). Build it.In the HUD's project, add Send Command to a button: target = the target, command =
bark. Build.Click the button: the target runs its
barkfunction.
Notes β
- The target still needs
*TARGETSto be scannable and to receive the command; the Events add-on handles the Receive Command event. - One target can have many commands; one HUD button can send commands to several targets (one action each).
- Commands carry no data, only the name. Use different names for different values (
speed_1,speed_2). - Both projects are independent; Finish each one separately.
Full example: HUD-to-Object Commands.