max_hit_range - ryzom/ryzomcore GitHub Wiki
title: Max Hit Range description: published: true date: 2023-03-16T23:08:39.006Z tags: editor: markdown dateCreated: 2023-03-16T22:25:42.398Z
The maxHitRange native AI script function sets the maximum hit range for the player, in meters.
()maxHitRange(MaxHitRange: f) - MaxHitRange (float): A floating-point number that sets the maximum hit range for the player in meters.
()maxHitRange(50); // Set the max hit range to 50 meters for all NPCs in the group.This example code sets the maximum hit range to 50 meters for all NPCs in the group.