Get 1Click Maker

Send Command ​

Send Command
PRO 30 memory Flow & Logic works on targets

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 ​

FieldRequiredWhat to enter
TargetYesA scanned target. $THIS is not valid here (call a function directly instead).
CommandYesThe command name, up to 30 characters. Must match a Receive Command event in the target exactly (case-sensitive).

How to set it up ​

  1. Give the target its own project: *BUILD, *FUNCTIONS and [add-on] - Events - 1Click inside it, rezzed on the ground. Open its panel link.

  2. 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.

  3. In the HUD's project, add Send Command to a button: target = the target, command = bark. Build.

  4. Click the button: the target runs its bark function.

Notes ​

  • The target still needs *TARGETS to 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.