Background for Fallout 4
Member of the Actor script
voidfunctionStartCombat(ActorakTarget, boolabPreferredTarget=false)Native

Description

Wiki Description

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

Documentation Comment

Starts combat with the target
abPreferredTarget - OPTIONAL (Def=false) True to set the target as the actor's preferred target


Caveats

CK Wiki - Notes

  • 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.


Parameters

ActorakTarget

CK Wiki Description

Who to attempt to initiate combat with.

boolabPreferredTarget=false

CK Wiki Description

If true, set akTarget as the actor's preferred target

  • Default:false

Examples

; Have this actor initiate combat with the player
StartCombat(Game.GetPlayer())
; Get two of our aliases to fight each other
Vader.StartCombat(Luke)

Auto-Generated Example

Actor myActor__akTarget
bool myBool__abPreferredTarget

myActor__toCallFunctionOn.StartCombat(myActor__akTarget, myBool__abPreferredTarget)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.