summon_player - ryzom/ryzomcore GitHub Wiki
title: Summon Player description: published: true date: 2023-03-12T15:24:44.013Z tags: editor: markdown dateCreated: 2023-03-12T15:24:40.600Z
The summonPlayer native AI script function can be used by a bot to summon a player to its location or to a specific location. This can be used, for example, by a boss to teleport a player to its location, or to create a teleporter.
()summonPlayer(botIndex: f, playerEid: s) // summonPlayer_fs_
- botIndex (float): The index of the bot in the current group.
- playerEid (string): The entityId of the player to be summoned.
($playerId)getRandomPlayerAggroListTarget(0);
()summonPlayer(0, $playerEid); // Teleport the player to the bot's location.
This example code gets a random player from the current group's aggro list and teleports them to the location of bot 0. The $playerId
variable is used to store the entityId of the player, and $playerEid
is used as the parameter for the summonPlayer
function.