PINGERton Agent Posted September 3, 2023 Posted September 3, 2023 There is mod called "Additional Player Voices", and this mod works solid. except one crucial flaw regarding script that confirms enemy death. This is script of problem. function OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, Bool abPowerAttack, Bool abSneakAttack, Bool abBashAttack, Bool abHitBlocked) if akAggressor == none || PreSource == akSource || victim == none || Player.IsDead() || Player.IsInKillMove() return elseIf victim.IsPlayerTeammate() || victim.IsEssential() return endIf if victim.GetActorValue("Health") > 0 as Float return endIf if victim.GetActorValue("Health") <= 0 as Float && (akAggressor as actor) as Bool PreSource = akSource self.GotoState("Busy") if akAggressor as actor == Player APVSQuest.NHPlaySound(5, 1 as Float) <-KILL CONFIRMED BY PLAYER elseIf (akAggressor as actor).IsPlayerTeammate() && !Player.IsInKillMove() APVSQuest.NHPlaySound(6, 1 as Float) <-KILL CONFIRMED BY FOLLOWER endIf self.GotoState("") PreSource = none self.GotoState("Death") endIf endFunction and function OnEffectStart(actor akTarget, actor akCaster) victim = akTarget However if i pour a firerate based magics or excessive DoT, it will count all of the damages done within seconds as kills, thus spamming bunch of "kill confirmed" voicelines like 10 times or more. Thus i need to add a logic check to prevent the counting of more than one Kill confirmation on single hostile. And turns out all other alternatives like getDead or isDead wont work on these occasion. especially isDead. papyrus says it has too many targets to process thus cannot be allowed. getDead, in the other hand, i just dunno how to use it properly since im totally blind on programming in general except disassemble and reassemble method done by fixing pascal files. Any tips on the most effective logic check? like "this script only works on single Killing blow". Ideas can be brought up, but not savvy enough to actually digest such ideas as practical papyrus codes. Need help regarding overlap prevention.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now