kampeao Posted April 29, 2012 Share Posted April 29, 2012 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 More sharing options...
15gudasc Posted April 29, 2012 Share Posted April 29, 2012 the function is startcombat, but you'll also want to make sure it knows who to start combat with. so, it'll end up being "startcombat player". Link to comment Share on other sites More sharing options...
b3w4r3 Posted April 29, 2012 Share Posted April 29, 2012 (edited) 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 April 29, 2012 by b3w4r3 Link to comment Share on other sites More sharing options...
ThiefHawk Posted April 30, 2012 Share Posted April 30, 2012 HawkREF.setav Aggression 2 HawkREF.startcombat playerhowever my problem is he also attacks people in good springs so adjusting faction is need Link to comment Share on other sites More sharing options...
Tubal Posted April 30, 2012 Share Posted April 30, 2012 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 More sharing options...
ThiefHawk Posted April 30, 2012 Share Posted April 30, 2012 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 More sharing options...
kampeao Posted May 2, 2012 Author Share Posted May 2, 2012 thanks...enemyref.startcombat player did the trick. Link to comment Share on other sites More sharing options...
Cyberlazy Posted May 2, 2012 Share Posted May 2, 2012 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 More sharing options...
Recommended Posts