AW_EVENT_AVATAR_CLICK

DESCRIPTION

Event called when a user left-clicks on an avatar  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 avatar, or if another nearby SDK application calls aw_avatar_click.   The following attributes are set by this event:

AW_AVATAR_SESSION
AW_AVATAR_NAME
AW_CLICKED_SESSION
AW_CLICKED_NAME

AW_AVATAR_SESSION and AW_AVATAR_NAME indicate the user that did the click, while  AW_CLICKED_SESSION and AW_CLICKED_NAME indicate the avatar that was clicked on.  Note that 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.)  In this case, AW_CLICKED_SESSION will be a valid session number but AW_CLICKED_NAME will be empty.

EXAMPLE

void handle_avatar_click (void)
{

  char*    clicked_name;

  clicked_name = aw_string (AW_CLICKED_NAME);
  if (!clicked_name[0])
    clicked_name = "someone";
  printf ("%s has just clicked on %s\n", aw_string (AW_AVATAR_NAME), 
    clicked_name);

}

aw_event_set (AW_EVENT_AVATAR_CLICK, handle_avatar_click);

SEE ALSO

aw_avatar_click
AW_EVENT_OBJECT_CLICK
AW_EVENT_OBJECT_SELECT