GetCategory

Category: Objects / Category
Since engine version: 4.6.5.0 CP

Description

Determines the category of an object. The category is usually specified in the DefCore but may in some cases haven been changed during the game by SetCategory. The category determines general placement and behaviour of the object. The returned category value can be compared with C4D_x constants using the & operator.

Syntax

int GetCategory (object pObj, id idDef);

Parameters

pObj:
[opt] Object of which to get the category. Can be 0 in local calls.
idDef:
[opt] If specified, the category of this definition is returned.

Example

if (GetCategory(obj) & C4D_Structure()) Incinerate(obj);
Incinerates the object if it is a building.
See also: SetCategory
Sven2, April 2002