Difference between revisions of "GetFriendHit"

From the CreationKit Wiki
Jump to navigation Jump to search
(I added additional clarification that GetFriend hit is will trigger when the SUBJECT is hit not if the SUBJECT hits. You for sure could do some work to change it around with more conditions etc but by default when this condition is run on the Target the target will meet this condition once they are hit. This was not clear or stated in the wiki so I tested it in game quick as I needed to use this exact condition and then detailed how it worked.)
(Noticed I had a typo in my last change so I fixed minor grammar.)
 
Line 4: Line 4:
  FriendlyGuard.GetFriendHit player  
  FriendlyGuard.GetFriendHit player  


Returns the number friendly hits from the TargetActor. Additionally, this means that if you use "GetFriendHit" as a condition attached to a spell given to a NPC, and the the Subject is the "target," then the spell in this example will trigger when the NPC with the spell is hit by a friendly.
Returns the number friendly hits from the TargetActor. Additionally, this means that if you use "GetFriendHit" as a condition attached to a spell given to a NPC, and set the Subject as the "target," then the spell in this example will trigger when the NPC with the spell is hit by a friendly.


[[Category:Console Commands]]
[[Category:Console Commands]]


[[Category:Condition Functions]]
[[Category:Condition Functions]]

Latest revision as of 11:39, 20 April 2024

Syntax:

[ActorID.]GetFriendHit TargetActor 

Example:

FriendlyGuard.GetFriendHit player 

Returns the number friendly hits from the TargetActor. Additionally, this means that if you use "GetFriendHit" as a condition attached to a spell given to a NPC, and set the Subject as the "target," then the spell in this example will trigger when the NPC with the spell is hit by a friendly.