AW_EVENT_OBJECT_CLICK

DESCRIPTION

Event called when a user left-clicks on an object in your area.

NOTES

This event requires at least SDK build 14 and world server build 21.  Also, users must be running Active Worlds Browser build 296 or later in order to trigger this event.

In order to receive this event, you must first announce your position by calling aw_state_change at least once.

This event is triggered whenever a nearby user left-clicks with the mouse on an object.   It will also be triggered if another nearby SDK application calls aw_object_click.  During this event, the following attributes are defined:

AW_AVATAR_SESSION
AW_AVATAR_NAME
AW_CELL_X
AW_CELL_Z
AW_OBJECT_NUMBER

In addition, beginning with build 24 of the SDK and version 3.3 of the world server, the following additional attributes are also defined:

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_AVATAR_SESSION and AW_AVATAR_NAME indicate the user that clicked on the object.  The clicked object is uniquely identified by AW_CELL_X, AW_CELL_Z, and AW_OBJECT_NUMBER.

EXAMPLE

void handle_object_click (void)
{

  printf ("%s has clicked on object #%d in cell (%d,%d)\n", 
    aw_string (AW_AVATAR_NAME), aw_int (AW_OBJECT_NUMBER), 
    aw_int (AW_CELL_X), aw_int (AW_CELL_Z));

}

aw_event_set (AW_EVENT_OBJECT_CLICK, handle_object_click);

SEE ALSO

aw_object_click
aw_object_select