Difference between revisions of "GetCombatState - Actor"
Jump to navigation
Jump to search
Added combat state bug
imported>Xander9009 (Added an example using the player.) |
imported>Enai Siaion (Added combat state bug) |
||
Line 33: | Line 33: | ||
Else ;State is not 0, so player is not peaceful | Else ;State is not 0, so player is not peaceful | ||
Debug.Notification("Player is in combat") | Debug.Notification("Player is in combat") | ||
EndIf | |||
</source> | |||
== Bug == | |||
This function is unreliable the first time it is called after a certain amount of time has passed. You should call it on an empty line first before calling it for real. | |||
<source lang="papyrus"> | |||
akTarget.GetCombatState() | |||
If akTarget.GeTcombatState() == 1 | |||
;do something important | |||
EndIf | EndIf | ||
</source> | </source> |