Jump to content

How to get NPC to NOT react to attack from player?


n000dlz

Recommended Posts

Hey forum,

 

I have an eyebot (temporary player follower in PlayerFaction and CurrentCompanionFaction) who I would like to not react if shot by the player. I'm not sure how it's accomplished in companions.

I can shoot hell out of Piper and get no reaction.

My eyebot takes only so much, then attacks me.

 

He is a protected character with no default packages, only my custom follow & travel hybrid AI package in the package list.

 

What Controlls this behaviour?

 

p.s. I don't want him to be set as 'Ghost' as I want his animation to react to being shot.

 

I'm modding for PS4, so no papyrus scripts!

 

Thanks

Link to comment
Share on other sites

The script function you need is Actor.IgnoreFriendlyHits(True)

 

For PS4 you will need to find a base game script you can attach to a quest reference alias to apply to your actor Dn136_AliasIgnoreFriendly would do the job.

Link to comment
Share on other sites

Excellent. Thank you.

Scriptname Dn136_AliasIgnoreFriendly extends ReferenceAlias
{script to set actor to Ignore Friendly Hits on load - for DN136_Attack}

Event OnLoad()
    Actor myActor = self.getActorRef()
    myActor.IgnoreFriendlyHits(TRUE)
EndEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...