Aw world attributes send
Minimum requirements | ||
---|---|---|
Added in version 4.1 | ||
SDK | build 53 |
int aw_world_attributes_send (int session_id)
Description
Sends the currently set world attributes to a specified session.
Callback
None (returns immediately)
Notes
If the bot modifies world attributes before it sends it to other sessions, make sure to set the world attribute back to the original content as received from the world before. Optionally the SDK application might want to save the sent world attributes for later reference.
Only instances owned by a caretaker (i.e. aw_bool (AW_WORLD_CARETAKER_CAPABILITY) returns 1) may use this method.
Arguments
- session_id
- Session number.
Argument attributes
All attributes prefixed by AW_WORLD except for the following can be sent:
- AW_WORLD_BOTS_RIGHT
- AW_WORLD_BUILD_NUMBER
- AW_WORLD_BUILD_CAPABILITY
- AW_WORLD_BUILD_RIGHT
- AW_WORLD_CARETAKER_CAPABILITY
- AW_WORLD_CREATION_TIMESTAMP
- AW_WORLD_EJECT_CAPABILITY
- AW_WORLD_EJECT_RIGHT
- AW_WORLD_EMINENT_DOMAIN_CAPABILITY
- AW_WORLD_EMINENT_DOMAIN_RIGHT
- AW_WORLD_ENTER_RIGHT
- AW_WORLD_EXPIRATION
- AW_WORLD_MAX_USERS
- AW_WORLD_OBJECT_COUNT
- AW_WORLD_OBJECT_PASSWORD
- AW_WORLD_PUBLIC_SPEAKER_CAPABILITY
- AW_WORLD_PUBLIC_SPEAKER_RIGHT
- AW_WORLD_SIZE
- AW_WORLD_SPEAK_RIGHT
- AW_WORLD_SPEAK_CAPABILITY
- AW_WORLD_SPECIAL_COMMANDS_RIGHT
- AW_WORLD_SPECIAL_OBJECTS_RIGHT
- AW_WORLD_TERRAIN_TIMESTAMP
- AW_WORLD_V4_OBJECTS_RIGHT
- AW_WORLD_VOIP_RIGHT
Return values
- RC_SUCCESS
- RC_NOT_INITIALIZED
- RC_NO_INSTANCE
- RC_NO_CONNECTION
- The connection to the world is down.
Returned attributes
None
Usage
int give_passthru_to (int session) { int old; /* value of the attribute before changing it */ int rc; old = aw_bool (AW_WORLD_ALLOW_PASSTHRU); aw_bool_set (AW_WORLD_ALLOW_PASSTHRU, 1); rc = aw_world_attributes_send (session); /* restore old value of the attribute */ aw_bool_set (AW_WORLD_ALLOW_PASSTHRU, old); return rc; }
Examples
C language
- Example #1
- World attribute zones