AW EVENT AVATAR CHANGE
Minimum requirements | ||
---|---|---|
Added in version 2.1 | ||
SDK | build 13 |
AW_EVENT_AVATAR_CHANGE
Description
A neighbor avatar has changed its state.
Notes
In order to receive the event, an instance must first announce its position by calling aw_state_change at least once, or enter the world in global mode. Only avatars for which AW_EVENT_AVATAR_ADD has been received will trigger this event.
For SDK build 29 and later, and world server version 3.4:
This event is used to report any change to the avatar of a bot instance using aw_avatar_set. AW_AVATAR_SESSION should be compared with aw_session () to see if it the local bot. If the change is for the local bot then it would be up to the application to decide if any AW_MY_ attributes should be updated:
if (aw_int (AW_AVATAR_SESSION) == aw_session ()) aw_int_set (AW_MY_TYPE, aw_int (AW_AVATAR_TYPE));
Attributes
- AW_AVATAR_SESSION
- AW_AVATAR_NAME
- AW_AVATAR_X
- AW_AVATAR_Y
- AW_AVATAR_Z
- AW_AVATAR_YAW
- AW_AVATAR_TYPE
- AW_AVATAR_GESTURE
- AW_AVATAR_PITCH
- AW_AVATAR_STATE
- AW_AVATAR_FLAGS
- AW_AVATAR_LOCK
- AW_PLUGIN_STRING
Usage
void handle_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, handle_avatar_change);