Larian Studios
Posted By: iwantcheese Final Boss Form Change - 22/11/17 01:26 AM
Everyone knows the final boss battle has to go through at least two stages. I'm trying to trigger a change when a particular enemy's health gets below a certain amount. I'm trying to use CharacterVitalityChanged()--which is the only event I can see that references vitality--but the DisplayText() I have set up to fire to make sure it's working doesn't show up. I searched the wiki but couldn't find any documentation for this API. The helper text asks for a character and an integer, which is says is a percentage. Doesn't say what it's a percentage of, but my assumption is max vitality.

Quote
IF
CharacterVitalityChanged(CHARACTERGUID_Grand_Father_Dick_31f20125-f047-4a8a-8b86-b9b2b9a67264, 95)
THEN
DisplayText(CHARACTERGUID_Grand_Father_Dick_31f20125-f047-4a8a-8b86-b9b2b9a67264, "lost some health");
Posted By: The Composer Re: Final Boss Form Change - 22/11/17 11:20 AM
Try a derivation of this:

IF
CharacterReceivedDamage(CHARACTERGUID_DC_VoidCat_3b96fa75-22e1-4410-bde5-0d469e18fae4)
AND
CharacterGetHitpointsPercentage(CHARACTERGUID_DC_VoidCat_3b96fa75-22e1-4410-bde5-0d469e18fae4,_Percentage)
AND
_Percentage <= 50
AND
GlobalGetFlag("VoidCatEnrageMode",0)
THEN
Posted By: Simzzz Re: Final Boss Form Change - 22/11/17 11:36 AM
Originally Posted by The Composer
Try a derivation of this:

IF
CharacterReceivedDamage(CHARACTERGUID_DC_VoidCat_3b96fa75-22e1-4410-bde5-0d469e18fae4)
AND
CharacterGetHitpointsPercentage(CHARACTERGUID_DC_VoidCat_3b96fa75-22e1-4410-bde5-0d469e18fae4,_Percentage)
AND
_Percentage <= 50
AND
GlobalGetFlag("VoidCatEnrageMode",0)
THEN


Was about to post something similar.


IF
CharacterVitalityChanged(CHARACTERGUID_Grand_Father_Dick_31f20125-f047-4a8a-8b86-b9b2b9a67264,_)
AND
CharacterGetHitpointsPercentage(CHARACTERGUID_Grand_Father_Dick_31f20125-f047-4a8a-8b86-b9b2b9a67264,_Hp)
AND
_Hp < 90
THEN
DisplayText(CHARACTERGUID_Grand_Father_Dick_31f20125-f047-4a8a-8b86-b9b2b9a67264, "Less than 90% health");
Posted By: iwantcheese Re: Final Boss Form Change - 22/11/17 01:13 PM
Thanks for the help. I got it to work using this:

Quote
IF
CharacterReceivedDamage(CHARACTERGUID_Grand_Father_Dick_31f20125-f047-4a8a-8b86-b9b2b9a67264)
AND
CharacterGetHitpointsPercentage(CHARACTERGUID_Grand_Father_Dick_31f20125-f047-4a8a-8b86-b9b2b9a67264,_Hp)
AND
_Hp < 90
THEN
DisplayText(CHARACTERGUID_Grand_Father_Dick_31f20125-f047-4a8a-8b86-b9b2b9a67264, "Less than 90% health");
© Larian Studios forums