Event called when an avatar in the scene changes attributes.
In order to receive this event, you must first announce your position by calling aw_state_change at least once. You will not receive this event for an avatar until you have first received the event AW_EVENT_AVATAR_ADD.
Beginning with build 29 of the SDK and version 3.4 of the world server this event is used to report a change to your avatar. AW_AVATAR_SESSION should be compared with aw_session () to see if it the local bot. If the change is for the local bot the AW_MY_TYPE attribute should be updated:
if (aw_int (AW_AVATAR_SESSION) == aw_session ()) aw_int_set (AW_MY_TYPE, aw_int (AW_AVATAR_TYPE));
Within the context of this event the following attributes are defined:
AW_AVATAR_SESSION
AW_AVATAR_NAME
AW_AVATAR_X
AW_AVATAR_Y
AW_AVATAR_Z
AW_AVATAR_YAW
AW_AVATAR_TYPE
AW_AVATAR_GESTURE
In addition, beginning with build 29 of the SDK and version 3.4 of the world server, the following additional attributes are also defined:
AW_AVATAR_PITCH
AW_AVATAR_STATE
void avatar_change (void)
{
if (aw_int (AW_AVATAR_SESSION) == aw_session ())
printf ("I have changed\n");
else
printf ("%s has changed\n", aw_string (AW_AVATAR_NAME));
} aw_event_set (AW_EVENT_AVATAR_CHANGE, avatar_change);
aw_state_change
AW_EVENT_AVATAR_ADD
AW_EVENT_AVATAR_DELETE
AW_EVENT_CHAT