KillEssential - Actor

Revision as of 23:27, 1 December 2021 by Jadkai (talk | contribs) (→‎Notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: Actor Script

Kills this actor with the passed-in actor being the culprit, even if he is essential.

SyntaxEdit

Function KillEssential(Actor akKiller = None)
    ActorBase akActorBase = GetBaseObject() as ActorBase
    if akActorBase.IsUnique()
        akActorBase.SetEssential(0)
    endif
    Kill(akKiller)
endFunction

ParametersEdit

  • akKiller: The Actor who is the guilty party in killing this one.
    • Default: None

Return ValueEdit

None.

ExamplesEdit

; Have the dragon kill the important person, even if essential
ImportantPerson.KillEssential(Dragon)

NotesEdit

  • KillEssential() does not work for essential actors whose actor base is not flagged as Unique.
  • This function does not work if the NPC has been made essential by virtue of being in an alias with the Essential flag.

See AlsoEdit