Skip to main content

Category

The Category type represents one or more categories that an entity can belong to. Categories are used for a few purposes:

  • Determining which colliders can collide with others
  • Querying for all entities that belong to particular categories (using the various Query functions)
  • Identifying whether an entity belongs to particular categories (by reading its Category property)

See the main page on Categories to learn more about how to declare and use categories.

pub tangible category Category:Projectile
pub category Category:AffectedByLava

Spawn projectile {
// Assign an entity to a category
Category = Category:Projectile
}

// Find all entities belong to either the Category:Projectile or Category:AffectedByLava categories
Query(filter = Category:Projectile | Category:AffectedByLava)