You are not logged in.
Pages: 1
As a response to the request on the 2.3.0 Beta forum:
/// @function tag_get_instance_ids(tags, includeChildren)
///
/// @param tags Single asset tag string, or an array with various asset tags
/// @param includeChildren Include children of objects with a tag
///
/// @return An array of all the instances that have the given tags assigned to their object asset
function tag_get_instance_ids(_tags, _include_children)
{
var _array = [];
var _count = 0;
var _asset_ids = tag_get_asset_ids(_tags, asset_object);
var _i = 0;
repeat(array_length(_asset_ids))
{
var _object = _asset_ids[_i];
with(_object)
{
//Skip children of tagged objects
if ((object_index != _object) && !_include_children) continue;
_array[_count] = id;
++_count;
}
++_i;
}
return _array;
}
Offline
Pages: 1