Jump to content

Question Regarding Knockdown Time


Shadowhawk827

Recommended Posts

Posted

Here's my situation...  After asking a few stupid questions here and at the Nexus, I decided to start learning to mod myself.

 

I have my first mod up on the Steam Workshop now.  Nothing fancy, it just adds some Dawnguard faction guards to the hold capitals to help with vampire attacks.  I made the Sentries unique and essential instead of having them respawn.  That way the capitals are never without extra security.  They'd take 10 days to respawn otherwise with vanilla settings, right?

 

 

HOWEVER, what I want to do for the sake of a tiny bit of realism, is fix it so the sentries stay down about 30 seconds if they lose enough health to enter bleedout.  Nobody on the Nexus or elsewhere seems to know how to do this (based on google searches).  I'm assuming that Sexlab Defeat (and maybe a few other mods here) use a script or other CK option to keep a defeated character down for the amount of time we select in the MCM options.

 

Can somebody help me figure out how to pull off what I'm trying to do?   I'm fairly new to modding but catch on fairly quick, so if it can be explained with reasonable clarity, I can institute it.

Posted

There's a place on each NPC where you can add a script to them. Use the OnBleedout event:

 

http://www.creationkit.com/OnEnterBleedout_-_Actor

 

Event OnBleedout()
    Actor victim = getActorRef()
    float SaveAv = victim.GetActorValue("HealRate")
    if SaveAv > 0
        victim.ForceAv("HealRate",0.0)
        utility.Wait(30)
        victim.ForceAv("HealRate",SaveAv)
    EndIf
EndEvent
This should do the trick. It catches the onbleedout event and if the actor wasn't already set to not heal it will force the actor to stop healing and wait 30 seconds then allow the normal healing to resume. It checks to make sure the heal rate isn't 0 already to catch any possible duplicate event triggers.
Posted

Awesome,  Thanks a ton, WaxenFigure.  This will let me keep the Sentries as essential without making them unbalance fights or make them unmanageable for PCs that agro them somehow. :)

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...