AW EVENT AVATAR CLICK

From ActiveWiki
Revision as of 05:54, 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.2
SDKbuild 14
Worldbuild 21
Browserbuild 296


AW_EVENT_AVATAR_CLICK

Description

User has left-clicked an avatar.

Notes

This event is triggered whenever a user left-clicks with the mouse on an avatar. It may also be triggered if another SDK application calls aw_avatar_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.

It is possible for a user to click on other avatars "through" objects. This is possible when a user sets their browser's "visibility" setting to a very low value, such as 30 meters. Objects further away than this distance will not be visible in the browser, allowing a user to click without regards to objects between the source and target. To eliminate this problem, set the "Minimum visibility" setting in the World features dialog to a higher value.

Attributes

AW_AVATAR_SESSION
Session number of the user that clicked.
AW_AVATAR_NAME
Name of the user that clicked.
AW_CLICKED_SESSION (1)
Session number of the avatar that was clicked.
AW_CLICKED_NAME (1)
Name of the avatar that was clicked.

(1) It is possible for the clicked avatar to be out of visible range of the application receiving this event (i.e. an avatar for which no AW_EVENT_AVATAR_ADD event has been received.)

Example

void handle_avatar_click (void)
{
  printf ("%s has just clicked on %s\n", aw_string (AW_AVATAR_NAME), aw_string (AW_CLICKED_NAME));
}

aw_event_set (AW_EVENT_AVATAR_CLICK, handle_avatar_click);

Triggered by

See also