Jump to content

How to make a npc attack me?


kampeao

Recommended Posts

I have a cubic activator and once the player enters it I want the enemy npc to attack the player.

How do I do this?

I want a npc to attack the player and only him...there are people around but I only want him to attack the player...

Is there any function for this or something?

Any ideas? thanks :)

Link to comment
Share on other sites

Lots of ways to do it. You could add a find package to the npc using addscriptpackage. Then set him in a faction that's the enemy of the player faction. Make sure his ai is set to aggressive.

 

If you have companions with you though he may target one of them. The startcombat function was changed to be less effective IMO when fallout 3 was released or you could have used it.

 

Edit: I knew someone would mention startcombat...The problem with that is if the actor isn't close enough to detect the target they will just ignore the function.

 

It caused a lot of problems in Oblivion because startcombat meant the two actors were locked into combat until one of them was dead. This kept the player from using fast travel even if the enemy was all the way across the map, as the game reported you can't fast travel while in combat.

 

It was a more useful function to be sure, you just had to script a way out of it if distance got far enough.

Edited by b3w4r3
Link to comment
Share on other sites

I think the problem there is that people in Goodsprings come to the players aid, so he's forced to fight them. You need to either move the fight to neutral territory or somehow make the GS people less helpful, maybe by temporarily lowering the PC's rep with them?
Link to comment
Share on other sites

I think the problem there is that people in Goodsprings come to the players aid, so he's forced to fight them. You need to either move the fight to neutral territory or somehow make the GS people less helpful, maybe by temporarily lowering the PC's rep with them?

i changed mine to

HawkREF.setav Aggression 2
HawkREF.startcombat player
HawkREF.AddToFaction GoodspringsFaction 1

 

and it works sorta lol not only he attacks me but so does old pete . and only one on my side is that dumb robot victor lmao

Link to comment
Share on other sites

Agression 2 will make NPC attack neutrals.

If you make the NPC allies with goodsprings, goodsprings may attack player.

b3w4r3 seems to have the best awnser, with idealy the NPC set to neutral with goodsprings and they shouldn't care about him except to come to the players aid after the NPC attacks player if the player is allied with goodsprings. (Not sure if they are set to help friends or help allies)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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