UnitResource - stingray.UnitResource namespace reference - Stingray Lua API Reference

stingray.UnitResource namespace reference

Description

Contains functions that operate on unit resources.

These functions can be used to extract information from unit resources without having to spawn the unit into the world. The unit resources must be loaded prior to calling these functions.

Dynamic Data

Parameters

unit_resource_name :

string

The name of the unit resource.

indices :

any(integer, string)+

One or more indices for the data, which may be integers or strings.

The + notation indicates that there may be one or more instances of the specified type.
The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.
Returns

any

The value previously set at the specified sequence of indices.

Parameters

unit_resource_name :

string

The name of the unit resource.

indices :

any(integer, string)+

One or more indices for the data, which may be integers or strings.

The + notation indicates that there may be one or more instances of the specified type.
The any(...) notation indicates that this item may be an instance of any of the types shown in the parentheses.
Returns

boolean

Returns true if a data value is stored at the specified sequence of indices, or false otherwise.