set_aggro - ryzom/ryzomcore GitHub Wiki


title: Set Aggro description: published: true date: 2023-03-16T23:09:57.952Z tags: editor: markdown dateCreated: 2023-03-16T22:27:21.257Z

setAggro

The setAggro native AI script function sets the aggro range and update period of the current group. The aggro range determines how close a bot must be to an enemy in order to attack, and the update period determines how often the bot checks for enemies within its aggro range.

Syntax

()setAggro(Range: f, NbTicks: f) // setAggro_ff_

Arguments

  • Range (float): The aggro range in meters.
  • NbTicks (float): The aggro update period in game cycles.

Example

()setAggro(10, 20);

This example code sets the aggro range of the current group to 10 meters and updates every 20 game cycles, or every 2 seconds.

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