Difference between revisions of "KillEssential - Actor"

Jump to navigation Jump to search
273 bytes added ,  08:24, 25 September 2019
Note about KillEssential not working for non-unique actors
imported>Rhavlovick
m (1 revision: Clobber re-import by Henning)
 
imported>Gavrant
(Note about KillEssential not working for non-unique actors)
Line 8: Line 8:
<source lang="papyrus">
<source lang="papyrus">
Function KillEssential(Actor akKiller = None)
Function KillEssential(Actor akKiller = None)
    ActorBase akActorBase = GetBaseObject() as ActorBase
    if akActorBase.IsUnique()
        akActorBase.SetEssential(0)
    endif
    Kill(akKiller)
endFunction
</source>
</source>


Line 22: Line 28:
ImportantPerson.KillEssential(Dragon)
ImportantPerson.KillEssential(Dragon)
</source>
</source>
== Notes ==
* KillEssential() does not work for essential actors whose actor base is not flagged as Unique.


== See Also ==
== See Also ==
Anonymous user

Navigation menu