teleport_near - ryzom/ryzomcore GitHub Wiki


title: Teleport Near description: published: true date: 2023-03-12T22:42:49.356Z tags: editor: markdown dateCreated: 2023-03-12T16:07:12.272Z

teleportNear

The teleportNear native AI script function teleports a player to a specific location and sends the notification user events to the specified NPC group.

TODO: This function causes one or more undocumented user event IDs to be triggered on the NPC group that is to be notified. The list of notifications needs to be documented here. {.is-danger}

TODO: This document is autogenerated and has not yet been reviewed. {.is-danger}

Syntax

()teleportNear(x: f, y: f, z: f, groupToNotify: c)

Arguments

  • x (float): The X-coordinate of the target location.
  • y (float): The Y-coordinate of the target location.
  • z (float): The Z-coordinate of the target location.
  • groupToNotify (group): The NPC group that will receive the user events to notify of the teleportations.

Example

(@groupToNotify)group_name.context();
teleportNear(100.0f, 200.0f, 300.0f, @groupToNotify);

This example code teleports the player to the location (100.0f, 200.0f, 300.0f) and sends a notification to the group_name group.

⚠️ **GitHub.com Fallback** ⚠️