AW EVENT OBJECT CLICK

From ActiveWiki
Jump to navigation Jump to search
Minimum requirements
Added in version 2.2
SDKbuild 14
Worldbuild 21
Browserbuild 296


AW_EVENT_OBJECT_CLICK

Description

User has clicked an object.

Notes

This event is triggered whenever a user clicks an object (by left-clicking on the object with the mouse.) It may also be triggered if another SDK application calls aw_object_click.

The avatars for which this event is triggered are governed by neighbor restrictions.

In order to receive this event, the application must first announce its position by calling aw_state_change at least once, or enter a world in global mode.

For SDK build 65 and later: This event will not be triggered for clicks on Groups and V4 objects (including movers).

Attributes

AW_AVATAR_SESSION (1)
AW_AVATAR_NAME
AW_CELL_X
AW_CELL_Z
AW_OBJECT_ID
AW_OBJECT_NUMBER
AW_OBJECT_TYPE
AW_OBJECT_SYNC
AW_OBJECT_X
AW_OBJECT_Y
AW_OBJECT_Z
AW_OBJECT_YAW
AW_OBJECT_TILT
AW_OBJECT_ROLL
AW_OBJECT_BUILD_TIMESTAMP
AW_OBJECT_OWNER
AW_OBJECT_MODEL
AW_OBJECT_DESCRIPTION
AW_OBJECT_ACTION
AW_OBJECT_DATA

(1) Be careful not to confuse this attribute with AW_OBJECT_SESSION, which is undefined for this event.

Usage

void handle_object_click ()
{
  printf ("Avatar %s clicked on object id=%u model=%s\n", 
    aw_string (AW_AVATAR_NAME),
    aw_int (AW_OBJECT_ID),
    aw_string (AW_OBJECT_MODEL));
}

aw_event_set (AW_EVENT_OBJECT_CLICK, handle_object_click);

Triggered by

See also