Background for Skyrim SE
Member of the Actor script
intfunctionGetCombatState()Native

Description

Wiki Description

Gets the actor's current combat state.

Documentation Comment

Gets this actor's current combat state


Caveats


Examples

; Is the pirate searching?
if (FilthyPirate.GetCombatState() == 2) ; 2 is "search"
  Debug.Trace("Careful! That filthy pirate is looking around...")
endIf
;Is the player in combat?
If ( Game.GetPlayer().GetCombatState() == 0 ) ;State is 0, so player is peaceful
  Debug.Notification("Player is not in combat")
Else ;State is not 0, so player is not peaceful
  Debug.Notification("Player is in combat")
EndIf

Auto-Generated Example

int returnedValue = myActor__toCallFunctionOn.GetCombatState()

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.