follow_player - ryzom/ryzomcore GitHub Wiki


title: Follow Player description: published: true date: 2023-03-12T18:00:54.816Z tags: editor: markdown dateCreated: 2023-03-12T17:59:33.897Z

followPlayer

The followPlayer native AI script function sets the activity of an NPC group to follow a specified player.

Syntax

()followPlayer(PlayerEid: s, Radius: f) // followPlayer_sf_

Arguments

  • PlayerEid (string): The ID of the player to follow.
  • Radius (float): The dispersion radius of the wander activity.

Examples

()followPlayer("(0x0002015bb4:01:88:88)", 10);

This example code sets the activity of the NPC group to follow the player with an ID of "(0x0002015bb4:01:88:88)" with a dispersion radius of 10.

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