Difference between revisions of "SetMaxHealth"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(looks okay, removing tag)
(Description)
 
Line 18: Line 18:
 
Set object's maximum health.
 
Set object's maximum health.
  
<!-- == Remarks == -->
+
== Remarks ==
<!-- This section contains additional comments, observations and known issues. -->
+
This function doesn't seem to work for creatures.
  
 +
It appears that Chargen_ModifyCreaturePropertyBase with PROPERTY_DEPLETABLE_HEALTH will increase or decrease maximum health by the specified amount. This workaround has not yet been tested exhaustively, but it is based on the Bioware code in sys_autoscale_h.
 
<!-- == Examples == -->
 
<!-- == Examples == -->
 
<!-- This section contains examples transcluded from the snippet library. -->
 
<!-- This section contains examples transcluded from the snippet library. -->

Latest revision as of 08:24, 11 May 2011

Set object's maximum health

void SetMaxHealth(
object oObject,
int nHealth
);
Parameters:
oObject
the object that we are modifying
nHealth
the new maximum health value for the object
Returns:

Nothing.

Source:

script.ldf

Description

Set object's maximum health.

Remarks

This function doesn't seem to work for creatures.

It appears that Chargen_ModifyCreaturePropertyBase with PROPERTY_DEPLETABLE_HEALTH will increase or decrease maximum health by the specified amount. This workaround has not yet been tested exhaustively, but it is based on the Bioware code in sys_autoscale_h.