Page MenuHomeFeedback Tracker

[Feature Request] New commands for filtering arrays of objects.
Assigned, NormalPublic

Description

A command that can quickly filter a list of objects based on selected parameters would be nice, similar to the countSide command except returning a new array.

There are many cases where people want to filter an array of objects with constant parameters, so using the select {} command is a huge waste of performance when the array is large.

Some examples:

_arrayOfObjs selectObjectClasses [ ["class1", "class2", ...], (exactMatch = false)];

with exactMatch, class inheritance is ignored and only exact typeOf matches are returned.

_arrayOfObjs selectObjectSides [east, west];

I'll try to update this list if I come up with more common "static" filters.

These commands can be used together with such commands as allObjects, units, allUnits, vehicles, etc. Also, filtering trigger's thisList would be nice too (though for that countSide is usually enough)

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Scripting

Event Timeline

Leopard20 updated the task description. (Show Details)Aug 25 2022, 8:50 AM
This comment was removed by BIS_fnc_KK.
Leopard20 updated the task description. (Show Details)Aug 25 2022, 9:34 AM
Leopard20 changed the task status from New to Assigned.
Leopard20 set Ref Ticket to AIII-56216.