Larian Banner
Previous Thread
Next Thread
Print Thread
#637610 22/11/17 01:26 AM
Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
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");

Joined: Sep 2017
Moderator
Offline
Moderator
Joined: Sep 2017
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

Joined: Nov 2017
S
stranger
Offline
stranger
S
Joined: Nov 2017
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");

Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
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");


Moderated by  Larian_Koala 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5