Type alias PlayerScriptSendablePlayer

PlayerScriptSendable: ExtJSON<PlayerScriptSendablePrims>

Data types that can be sent using PlayerScript.sendTo.

Specifically, numbers, strings, booleans, Vector2, Vector3, Quaternion, PlayerId, ItemId, arrays of the aforementioned types, and objects having keys assigned with strings are PlayerScriptSendable.

Example

_.sendTo(_.sourceItemId, "message1", 10); // Send a number
_.sendTo(_.sourceItemId, "message2", "hello"); // Send a string
_.sendTo(_.sourceItemId, "message3", true); // Send a boolean
_.sendTo(_.sourceItemId, "message4", { foo: "bar" }); // Send an object
_.sendTo(_.sourceItemId, "message5", [1, 2, 3]); // Send an array
_.sendTo(_.sourceItemId, "message6", { // Send a complex object
array: [1, 2, 3],
object: { foo: "bar" },
});

Generated using TypeDoc