SetProtected - ActorBase

From the CreationKit Wiki
Revision as of 01:02, 12 November 2023 by TwilightSky (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: ActorBase Script

Sets or clears this actor's protected flag. If you set the flag, and the actor is essential, the essential flag will be cleared.

Syntax

Function SetProtected(bool abProtected = true) native

Parameters

  • abProtected: Whether to set or clear this actor's protected flag.
    • Default: True

Return Value

None.

Examples

; Flag the Emperor as protected
EmperorBaseActorProperty.SetProtected()


; Flag RedShirt as non-protected
RedShirtBaseActorProperty.SetProtected(false)

Notes

  • This function is overridden by the flag on a quest alias.
  • When an actor is protected they can only be killed by the player.

See Also