StartCombat - Actor

From the Fallout4 CreationKit Wiki
(Redirected from Actor.StartCombat (Papyrus))
Jump to navigation Jump to search

Member of: Actor Script

Attempts to get this actor to initiate combat with the target.

Syntax[edit | edit source]

Function StartCombat(Actor akTarget, bool abPreferredTarget = false) native

Parameters[edit | edit source]

  • akTarget: Who to attempt to initiate combat with.
  • abPreferredTarget : If true, set akTarget as the actor's preferred target
    • Default: false

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Have this actor initiate combat with the player
StartCombat(Game.GetPlayer())


; Get two of our aliases to fight each other
Vader.StartCombat(Luke)

Notes[edit | edit source]

  • This function will fail and throw an error to the log when called on an actor that has come out of bleedout but has not

yet reached full health. At that point you must wait a few seconds before calling this function.

See Also[edit | edit source]