Contains functions that operate on level resources set up in the level editor.
These functions can be used to extract information from level resources without having to load the level into the world. The level resources must be loaded prior to calling these functions.
Other related reference items
create_navigation_mesh ( level_resource ) : stingray.NavigationMeshInstantiates a new navigation mesh from the shared navigation mesh resource inside the named level resource.
|
level_resource : | string | The name of a currently loaded level resource. |
The newly created navigation mesh. |
Users are responsible for calling destroy_navigation_mesh() on the returned navigation mesh once they are done with it.
Other related reference items
data ( level_resource ) : stingray.DynamicDataReturns a DynamicData object for the level, which can be queried by calling DynamicData.get().
|
level_resource : | string | The name of a currently loaded level resource. |
A dynamic data object for the level. |
This allows you to extract the same script data that is accessible through Level.get_data() without spawning the level.
Other related reference items
destroy_navigation_mesh ( level_resource, mesh )Destroys a navigation mesh that was obtained by calling create_navigation_mesh().
|
level_resource : | string | The name of a currently loaded level resource. |
mesh : | The navigation mesh to destroy. |
This function does not return any values. |
This function should only be called on navigation meshes obtained through the create_navigation_mesh() function. Do not attempt to destroy a navigation mesh that was obtained using Level.navigation_mesh().
Other related reference items
object_set_names ( level_resource ) : string[]Returns a list of object set names defined inside the named level resource.
|
level_resource : | string | The name of a currently loaded level resource. |
string[] |
A list of object set names. The [] notation indicates that this type is an array: a table in which the keys of the members are sequential integers, and the value of each element is an instance of the type shown. |
Other related reference items
unit_data ( level_resource, index ) : stingray.DynamicDataReturns a DynamicData object for a unit inside a level resource, which can be queried by calling DynamicData.get().
|
level_resource : | string | The name of a currently loaded level resource. |
index : | integer | The index of the unit. |
A dynamic data object for the unit. |
This allows you to extract the same script data that is accessible through Unit.get_data() without spawning the level.
Other related reference items
unit_indices ( level_resource, unit_name ) : integer[]Returns a list of unit indices that match the specified unit resource name inside the named level resource.
|
level_resource : | string | The name of a currently loaded level resource. |
unit_name : | string | The name of the unit resource. |
integer[] |
A list of unit indices. The [] notation indicates that this type is an array: a table in which the keys of the members are sequential integers, and the value of each element is an instance of the type shown. |
unit_indices_in_object_set ( level_resource, object_set_name ) : integer[]Returns a list of all unit indices that belong to the specified object set inside the named level resource.
|
level_resource : | string | The name of a currently loaded level resource. |
object_set_name : | string | An object set inside the level resource. |
integer[] |
A list of unit indices belonging to the object set. The [] notation indicates that this type is an array: a table in which the keys of the members are sequential integers, and the value of each element is an instance of the type shown. |
unit_position ( level_resource, unit_index ) : stingray.Vector3Returns the local position of the unit with the specified index inside the named level resource.
|
level_resource : | string | The name of a currently loaded level resource. |
unit_index : | integer | The index of the unit. |
The position of the unit set up in the level resource. |
unit_rotation ( level_resource, unit_index ) : stingray.QuaternionReturns the local rotation of the unit with the specified index inside the named level resource.
|
level_resource : | string | The name of a currently loaded level resource. |
unit_index : | integer | The index of the unit. |
The rotation of the unit set up in the level resource. |