Trap that sends an arbitrary message when turned on or off. Each ScriptParams link names the message to send to the destination of the link. The message is sent with the first data argument set to whether the trap was turned on or off. The data argument to use can be changed with status_index. If this is not 1, 2, or 3 then no status is sent and the trap only responds to TurnOn. The message data arguments not being used for status can be set with other parameters. The parameter string starts with a letter to tell what type of value is being used.
i | An integer. |
f | A real number. |
v | A real vector. Enter three numbers separated with commas. |
s | A string. |
If the first letter doesn’t match, the script will guess if the parameter is a number or a string.
Inherits | BaseTrap | |
---|---|---|
Links | ScriptParams(msg) | Send message in data to the linked object. |
Parameters | status_index (integer) | 1 (default, 2, or 3. Sets data to 1 when turned on, 0 when off. |
data (string) | Extra message data. Sets first data not used by status_index. | |
data1 (string) | First extra data. | |
data2 (string) | Second extra data. | |
data3 (string) | Third extra data. |