teleport_player - ryzom/ryzomcore GitHub Wiki
title: Teleport Player description: published: true date: 2023-03-12T17:09:00.056Z tags: editor: markdown dateCreated: 2023-03-12T17:04:36.396Z
The teleportPlayer native AI script function teleports a player to a specified position, identified by its x, y, z, and heading coordinates.
()teleportPlayer(playerId: s, x: f, y: f, z: f, heading: f) // teleportPlayer_sffff_
- playerId (string): The EntityId of the player to teleport.
- x (float): The X-coordinate of the target position.
- y (float): The Y-coordinate of the target position.
- z (float): The Z-coordinate of the target position.
- heading (float): The heading angle of the player after the teleportation.
($playerId)getRandomPlayerAggroListTarget(0);
()teleportPlayer($playerEid, 1000, 1000, 100, 0);
This example code gets a random player with aggro list target and teleports them to the position (1000, 1000, 100)
with a heading of 0.