Calculating damage dealt to mob via acs
Posted: Wed Mar 23, 2022 11:31 am
Not sure how feasible this is, or if it's even possible for that matter, but I'm trying to figure out how to calculate damage dealt to an enemy through acs.
What I'm aiming to do is get a return value to use as a jump state for different enemy deaths (e.g. if damage >= 25, "randomdeathstate"). Why? To see if I can trigger enemy deaths without replacing weapons or the use of spacial puff types...so vanilla weaponry. Hopefully the end result is better compatibility with weapon mods while maintainingg unique death states.
My guess is that the best way to do so would be calling the acs script through an enemy's pain state, with the use of GetActorProperty(0, APROP_Health); to store their current health somehow, then subtract their health property the next time damage is dealt in order to get the return value for said jump.
Hoping to get some insight here (and maybe some pointers if I'm lucky)!
Thanks!!
What I'm aiming to do is get a return value to use as a jump state for different enemy deaths (e.g. if damage >= 25, "randomdeathstate"). Why? To see if I can trigger enemy deaths without replacing weapons or the use of spacial puff types...so vanilla weaponry. Hopefully the end result is better compatibility with weapon mods while maintainingg unique death states.
My guess is that the best way to do so would be calling the acs script through an enemy's pain state, with the use of GetActorProperty(0, APROP_Health); to store their current health somehow, then subtract their health property the next time damage is dealt in order to get the return value for said jump.
Hoping to get some insight here (and maybe some pointers if I'm lucky)!
Thanks!!