-
Notifications
You must be signed in to change notification settings - Fork 94
scale_hp
Ryzom Core Wiki edited this page Jul 8, 2024
·
3 revisions
title: Scale HP description: published: true date: 2023-03-16T23:09:51.012Z tags: editor: markdown dateCreated: 2023-03-16T22:27:13.403Z
The downScaleHP native AI script function scales the bots' HP down by removing a factor of their current HP.
The upScaleHP native AI script function scales the bots' HP up by adding a factor of their missing HP (the difference between max and current HP).
The scaleHP native AI script function scales the bots' HP by adding a factor of their current HP.
()downScaleHP(Coef: f) // downScaleHP_f_
()upScaleHP(Coef: f) // upScaleHP_f_
()scaleHP(Coef: f) // scaleHP_f_
- Coef (float): The percentage of the bots' HP to scale by.
()downScaleHP(0.5); // Scales the bots' HP down by half
This example code scales the bots' HP down by removing half of their current HP.
()upScaleHP(0.5); // Restores half of the bots' missing HP
This example code scales the bots' HP up by adding half of their missing HP.
()scaleHP(2); // Scales the bots' HP up by adding twice their current HP
This example code scales the bots' HP by adding twice their current HP.