Moves a user to a new location.
None (returns immediately)
This method is new in Active Worlds 3.0 and requires at least SDK build 16 and world server build 23. Additionally, the user to be teleported must be running version 3.0 or later of the Active Worlds browser or this call will have no effect on them.
The argument session_id specifies the user to teleport. The location the user is teleported to is specified by the attributes AW_TELEPORT_WORLD, AW_TELEPORT_X, AW_TELEPORT_Y, AW_TELEPORT_Z, and AW_TELEPORT_YAW.
Additionally, if the boolean attribute AW_TELEPORT_WARP is set to 1, the user is "warped" smoothly to the new location (in the same manner as the object action warp command). Otherwise, the user is teleported instantly.
Users can be teleport to different worlds by setting the AW_TELEPORT_WORLD attribute. For teleports within the same world, AW_TELEPORT_WORLD should be set to "". Users cannot be "warped" to different worlds.
This method is primarily intended to allow bots to teleport human users around in a world. Since it is up to the receiving application to act on the teleport, it will usually not have any effect when directed at other bots unless those bots have been explicitly programmed to respond to the AW_EVENT_TELEPORT event.
The calling instance must be owned by a caretaker or have the EJECT right in order to use aw_teleport.
/* teleport a user to Ground Zero */
void send_to_gz (int session)
{
aw_int_set (AW_TELEPORT_X, 0);
aw_int_set (AW_TELEPORT_Y, 0);
aw_int_set (AW_TELEPORT_Z, 0);
aw_int_set (AW_TELEPORT_YAW, 0);
aw_string_set (AW_TELEPORT_WORLD, "");
aw_bool_set (AW_TELEPORT_WARP, 0);
if (aw_teleport (session))
printf ("Unable to teleport session %d\n", session);
else
printf ("Session %d teleported to 0N 0W\n", session);
}