Jump to content

[LE] Making bandits essential with a script


IanRB

Recommended Posts

Hey everyone. So, I have a quick question, would it be possible to make a quest that runs every time you enter a new location, checks for enemies around with "bandit" on their name, and makes them essential? I'm doing a pacifist no-kill run using NPC Knockout Overhaul, and sometimes bandits will die in one hit skipping bleedout state completely, so I'd like to make sure there are no accidental kills.

I wanna know if its possible 'cause I'm starting to dip my toes on Papyrus scripting (which would be the ideal way to go about this as far as I know), and having tried coding before and hating it, I don't wanna waste time for no reason.

If it's possible, some pointers would be much appreciated.

Thank you!

Link to comment
Share on other sites

Yes it's possible. There's a papyrus function SetEssential which works on actor bases. https://www.creationkit.com/index.php?title=SetEssential_-_ActorBase So the function would be SomeActor.GetActorBase().SetEssential()

 

What you could do, ls make a cloak spell with conditions on it in the Creation Kit, IsEssential == 0, then put the script on the cloak's magic effect.

 

Scriptname SetEssentialScript extends ActiveMagicEffect 

Event OnEffectStart(Actor akTarget, Actor akCaster)
    Utility.Wait(0.1) 
    akTarget.GetActorBase().SetEssential()
EndEvent
You can put more conditions on the cloak if you only want it to apply to certain NPC types.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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