GetMaxHitPoints
From NWN Lexicon
Contents |
[edit] GetMaxHitPoints(object)
Get the maximum hit points (HP) of an object.
int GetMaxHitPoints( object oObject = OBJECT_SELF );
[edit] Parameters
oObject
The object whose HP are to be returned. (Default: OBJECT_SELF)
[edit] Description
Returns an integer that indicates the total hit points (HP) of an object. This function will return the number 0 if an error occurs (e.g., if the object has no hit points). Hit points attained through spell effects and similar devices are not counted. For example, assume a PC has the virtue spell applied to him or her, giving 1 extra HP--this would not be counted (e.g., with 52/52 HP normally but with virtue 53/52, the value 52 would be returned).
[edit] Version
1.27
[edit] Example
// Finds the maximum hit points for a PC void main() { int i = GetMaxHitPoints(GetFirstPC()); SendMessageToPC(GetFirstPC(),IntToString(i)); }
[edit] See Also
functions: |
author: GoLeM, editor: Charles Feduke