Jump to content

Photo

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

ps4 ai ai package actor npc pc behaviour companion combat

  • Please log in to reply
2 replies to this topic

#1
n000dlz

n000dlz

    Journeyman

  • Members
  • Pip
  • 40 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



#2
SKK50

SKK50

    Institutum delenda est

  • Premium Member
  • 5,786 posts

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.



#3
n000dlz

n000dlz

    Journeyman

  • Members
  • Pip
  • 40 posts

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






Also tagged with one or more of these keywords: ps4, ai, ai package, actor, npc, pc, behaviour, companion, combat

IPB skins by Skinbox
Page loaded in: 1.045 seconds