From Mod Wiki
integer mask -- Mask of which allegiances to match. This may include TA_FLAG_FRIEND, TA_FLAG_NEUTRAL, and TA_FLAG_ENEMY. boolean inclusive -- Whether to include or exclude matched entities.
- This does not use disguise information, for that use filterEntitiesByDisguiseAllegiance.
Removes entities from the entity cache based on whether they are of the given allegiance relative to this entity, and returns the number that are left.