set_max_hp - ryzom/ryzomcore GitHub Wiki


title: Set Max HP description: published: true date: 2023-03-14T02:59:36.783Z tags: editor: markdown dateCreated: 2023-03-14T02:59:36.783Z

setMaxHP

The setMaxHP native AI script function is used to set the maximum HP level of each bot in the current group.

Syntax

()setMaxHP(MaxHP: f, SetFull: f)

Arguments

  • MaxHP (float): The new maximum HP for each bot.
  • SetFull (float): If not 0, sets the HP to the new maximum.

Examples

()setMaxHP(50000, 1);

This example code sets the maximum HP of each bot in the group to 50000 and sets their current HP to the new maximum.

Notes

If a bot is not spawned, its maximum HP is not affected by this function.

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