Difference between revisions of "IsHostileToActor- Actor"
Jump to navigation
Jump to search
→Examples
imported>Seorin |
imported>Rasikko |
||
Line 22: | Line 22: | ||
Debug.Trace("Dragon is hostile to the guard") | Debug.Trace("Dragon is hostile to the guard") | ||
endIf | endIf | ||
</source> | |||
To avoid the crash issue.. | |||
<source lang="papyrus"> | |||
Function isActorHostile(Actor akCallingActor, Actor akActorRef) | |||
if akActor == none | |||
return | |||
else | |||
if akCallingActor.isHostileToActor(akActorRef) | |||
; code here | |||
endif | |||
endif | |||
return | |||
EndFunction | |||
</source> | </source> | ||