Object Character Flags

Object Character Flags are attributes of an object, which are computed from some DefCore entries and the current state of the object in the landscape. They are automatically updated by the engine.
All OCF are stored in a 32 bit wide bitmask. They can be tested with a simple bitwise "and". For example:
if (GetOCF(objekt) & OCF_Living)
  Log("Das Objekt ist ein Lebewesen.");
The most common application for OCF are FindObject loops:
var obj;
while (obj = FindObject(0, -100,-100,200,200, OCF_Rotate, 0,0, NoContainer(), obj)
  SetR(180, obj);
This script turns all rotatable objects upside down.

OCF Constants

The following OCFs are defined in C4Script:
OCF_Alive, OCF_AttractLightning, OCF_Available, OCF_Chop, OCF_Collectible, OCF_Collection, OCF_Construct, OCF_Container, OCF_CrewMember, OCF_Edible, OCF_Entrance, OCF_Exclusive, OCF_FightReady, OCF_Fullcon, OCF_Grab, OCF_HitSpeed1, OCF_HitSpeed2, OCF_HitSpeed3, OCF_HitSpeed4, OCF_Inflammable, OCF_InFree, OCF_InLiquid, OCF_InSolid, OCF_LineConstruct, OCF_Living, OCF_NotContained, OCF_OnFire, OCF_Powerconsumer, OCF_PowerSupply, OCF_Prey, OCF_Rotate
Sven2, Mai 2002