AW EVENT OBJECT ADD

From ActiveWiki
Jump to navigation Jump to search


Minimum requirements
Added in version 2.1
SDKbuild 13


AW_EVENT_OBJECT_ADD

Description

An object has been added or changed.

Notes

This event is triggered when an instance is fully up to date in a zone (see aw_query).

For world server version 3.3 and later, and SDK build 24 and later: This event is also triggered when an instance has entered the world in global mode.

Changes to existing objects are sent to applications as an AW_EVENT_OBJECT_ADD event followed immediately by an AW_EVENT_OBJECT_DELETE event. In other words, object changes are actually implemented as an addition of the object in its new state followed by a deletion of the old object.

Note that if the application is maintaining a sequence array for this zone (see aw_query), it should update the sequence array using the values of AW_CELL_X, AW_CELL_Z, and AW_CELL_SEQUENCE to avoid re-downloading this same object on future calls to aw_query.

See Property for more information.

Attributes

AW_OBJECT_SESSION (1) (2)
AW_CELL_SEQUENCE
AW_CELL_X
AW_CELL_Z
AW_OBJECT_TYPE
AW_OBJECT_ID
AW_OBJECT_NUMBER
AW_OBJECT_OWNER
AW_OBJECT_BUILD_TIMESTAMP
AW_OBJECT_X
AW_OBJECT_Y
AW_OBJECT_Z
AW_OBJECT_YAW
AW_OBJECT_TILT
AW_OBJECT_ROLL
AW_OBJECT_MODEL
AW_OBJECT_DESCRIPTION
AW_OBJECT_ACTION
AW_OBJECT_DATA

(1) It is possible for the session to be out of visible range of the instance receiving this event or that there is no avatar established for it (i.e. a session for which no AW_EVENT_AVATAR_ADD event has been received).

(2) Be careful not to confuse this attribute with AW_AVATAR_SESSION which is undefined for this event.

Usage

void object_add (void)
{
  printf ("Session %d has added a %s nearby",
          aw_int (AW_OBJECT_SESSION),
          aw_string (AW_OBJECT_MODEL));
}

aw_event_set (AW_EVENT_OBJECT_ADD, object_add);

Triggered by

See also