ScatterSystem - stingray.ScatterSystem object reference - Stingray Lua API Reference

stingray.ScatterSystem object reference

Description

Used to spawn large number of units.

The units are pooled internally, and only the units within a certain distance will be visible.

Functions

Parameters

self :

stingray.ScatterSystem

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.
Returns
This function does not return any values.
Parameters

self :

stingray.ScatterSystem

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

brush_id :

integer

The index of the brush to destroy.

Returns
This function does not return any values.
Parameters

self :

stingray.ScatterSystem

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

observer_id :

integer

The index of the observer to destroy.

Returns
This function does not return any values.
Parameters

self :

stingray.ScatterSystem

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

settings :

scatter_system_brush

A table that provides settings for the new brush.

Returns

integer

The index of the newly created brush.

Parameters

self :

stingray.ScatterSystem

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

position :

stingray.Vector3

The position of the observer.

rotation :

stingray.Quaternion?

Optional; the rotation of the observer.

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Returns

integer

The index of the newly created observer.

Observers determine which units are visible. There must be at least one observer in order for any brush units to be visible. Typically, you create a single observer and move it manually in order to synchronize it with the position of the viewing camera. You can also create multiple observers if you need the spawning of units to be controlled from multiple positions.

Parameters

self :

stingray.ScatterSystem

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

observer_id :

integer

The index of the observer to move.

position :

stingray.Vector3

The new position for the observer.

rotation :

stingray.Quaternion?

Optional; the new rotation for the observer.

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Returns
This function does not return any values.
Parameters

self :

stingray.ScatterSystem

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

brush_id :

integer

The index of the brush to use.

position :

stingray.Vector3

The position at which the unit is spawned.

rotation :

stingray.Quaternion?

Optional; the starting rotation of the new unit.

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Returns

integer

The index of the newly spawned unit.

Parameters

self :

stingray.ScatterSystem

Specifies the object instance that this function will act on.

You may use the colon : calling syntax to call this function on an instance of this object. If you do so, you must omit this parameter. For more information, see this Stingray help topic, or this page in the Lua documentation.

unit_id :

integer

The index of the unit to unspawn.

Returns
This function does not return any values.