instance_select_filter(obj_or_instance_or_array_of_them, variable_name, condition_string, condition_value);
Argument name Type Description
obj_or_instance_or_array_of_them array|instance|object The instances, objects, or combination of them
variable_name string variable name as a string (which value will be used for testing)
condition_string string Condition to check for. See description for more info.
condition_value any The value to compare to.

Returns: (array) The array with the instances


This will return an array of instances filtered by the specified condition. For more info about obj_or_instance_or_array_of_them argument check instance_select();

The posible values for condition_string can be: ">", "<", ">=", "<=", "=", "==", "!=", "<>"


// if you want to select the all the obj_tree instances which
// Y position is less than 180 you can do:

var arr = instance_select_filter( obj_tree, "y", "<", 180);

// This will return an array with ALL the ids of the instances of the
// obj_tree which y position is below 180.