int aw_object_change (void)

DESCRIPTION

Changes an existing object.

CALLBACK

AW_CALLBACK_OBJECT_RESULT

NOTES

The object to be changed is uniquely identified by the attributes AW_OBJECT_OLD_NUMBER, AW_OBJECT_OLD_X, and AW_OBJECT_OLD_Z.  These values are typically taken from the attributes AW_OBJECT_NUMBER, AW_OBJECT_X, and AW_OBJECT_Z within the context of either the AW_EVENT_CELL_OBJECT or AW_EVENT_OBJECT_ADD event.

If aw_object_change completes successfully, AW_OBJECT_NUMBER will contain the new object number assigned automatically by the SDK.  If you have the callback AW_CALLBACK_OBJECT_RESULT installed, AW_OBJECT_NUMBER will be set during the callback to indicate which object the callback is for.  This can be useful in applications that issue multiple asynchronous building requests.

EXAMPLE

int		rc;

aw_int_set (AW_OBJECT_OLD_NUMBER, 1278643762);
aw_int_set (AW_OBJECT_OLD_X, 0);
aw_int_set (AW_OBJECT_OLD_Z, 0);
aw_int_set (AW_OBJECT_X, -200);
aw_int_set (AW_OBJECT_Y, 0);
aw_int_set (AW_OBJECT_Z, 0);
aw_int_set (AW_OBJECT_YAW, 0);
aw_int_set (AW_OBJECT_TILT, 0);
aw_int_set (AW_OBJECT_ROLL, 0);
aw_int_set (AW_OBJECT_OWNER, my_number);
aw_string_set (AW_OBJECT_MODEL, "street1.rwx");
aw_string_set (AW_OBJECT_DESCRIPTION, "Cornerstone");
aw_string_set (AW_OBJECT_ACTION, "create sound xyz.mid");
if (rc = aw_object_change ())
  printf ("Unable to change object (reason %d)\n", rc);
else
  puts ("Object changed");

SEE ALSO

aw_delete_all_objects
aw_object_add
aw_object_delete
aw_object_load