AW EVENT ENTITY CHANGE

From ActiveWiki
Jump to navigation Jump to search


Minimum requirements
Added in version 4.1
SDKbuild 53
Browserbuild 948


AW_EVENT_ENTITY_CHANGE

Description

Receives mover attributes whenever one of the entity specific attributes change.

Attributes

AW_ENTITY_TYPE
AW_ENTITY_ID
AW_ENTITY_STATE
AW_ENTITY_FLAGS
AW_ENTITY_X
AW_ENTITY_Y
AW_ENTITY_Z
AW_ENTITY_YAW
AW_ENTITY_PITCH
AW_ENTITY_ROLL
AW_ENTITY_OWNER_SESSION
AW_ENTITY_MODEL_NUM

Usage

void handle_entity_change (void)
{
  if (aw_int (AW_ENTITY_TYPE) != AW_ENTITY_TYPE_MOVER)
    return;
  
  printf ("Mover %d changed: state:%d @ %d %d %d \n",
          aw_int (AW_ENTITY_ID),
          aw_int (AW_ENTITY_STATE),
          aw_int (AW_ENTITY_X),
          aw_int (AW_ENTITY_Y),
          aw_int (AW_ENTITY_Z));
}

aw_event_set (AW_EVENT_ENTITY_CHANGE, handle_entity_change);

See also