Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#628220 08/10/17 02:52 PM
Joined: Sep 2017
Koun Offline OP
stranger
OP Offline
stranger
Joined: Sep 2017
Hey!

I've been trying to implement spells that cause the user to take a percentage of their max health as damage when cast.

Unfortunately i can't figure out how to implement it properly.

My last attempt was using a Potion effect used by SELF:CONSUME on cast with the effect having a negative VitalityPercentage.
Aside from that being pretty ugly it also doesn't work properly for undead, naturally.

I've considered making a custom status and then using OnStatusApplied in a character script but i can't seem to find a way to actually properly inflict damage inside the script. (In addition to not actually understanding how to add the script to every character, i.e. base, i haven't done much in this area)

Maybe I'm just missing something obvious here but i would appreciate any hints smile

Last edited by Koun; 08/10/17 02:55 PM.
Joined: Oct 2017
Location: United Kingdom
journeyman
Offline
journeyman
Joined: Oct 2017
Location: United Kingdom
There is a CharacterSetHitpointsPercentage call. CharacterSetHitpointsPercentage(badGuy,50); halves badGuy's HP e.g. So if you could incorporate that into the spell somehow, I've not tried anything like that so I'm not sure how.

Joined: Sep 2017
Koun Offline OP
stranger
OP Offline
stranger
Joined: Sep 2017
Originally Posted by Branvex
There is a CharacterSetHitpointsPercentage call. CharacterSetHitpointsPercentage(badGuy,50); halves badGuy's HP e.g. So if you could incorporate that into the spell somehow, I've not tried anything like that so I'm not sure how.


I've considered that but setting the health to an absolute percentage seems kind of tricky when i need to inflict, say 5% of the casters health as damage.

Entirely possible that i do not properly understand this though smile


Moderated by  Larian_KVN 

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