AW EVENT OBJECT DELETE

From ActiveWiki
Revision as of 05:50, 20 December 2008 by Macavity (talk | contribs) (Global mode => SDK Global Mode)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Minimum requirements
Added in version 2.1
SDKbuild 13


AW_EVENT_OBJECT_DELETE

Description

An object has been changed or deleted in the area.

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_OBJECT_ID
AW_OBJECT_NUMBER
AW_CELL_X
AW_CELL_Z
AW_CELL_SEQUENCE

(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 handle_object_delete (void)
{
  printf ("Object id %u has been deleted in cell %d %d\n",
          aw_int (AW_OBJECT_ID),
          aw_int (AW_CELL_X),
          aw_int (AW_CELL_Z));
}

aw_event_set (AW_EVENT_OBJECT_DELETE, handle_object_delete);

Triggered by

See also