Player Faction Question...

Post » Tue May 17, 2011 2:12 pm

So I've noticed some peculiar behavior in my mod and am curious why, I have a robot that wanders around and then turrets as well that all belong to the player faction and no others; I figured this would make it so they only attack things that are hostile to me. Unfortunately I have seen some weird stuff that makes it seem untrue? For instance I've seen the robot trying to kill corpse flies (from MMM) for like 30 minutes (because it can't hit the tiny things) and then my turrets turning around and unloading on Brotherhood of Steel members (I can't remember who fired first, either way it shouldn't happen?).

Whats the deal?


Also if I have a door with an OnActivate block and then only let the player use it, will that prevent enemies from chasing me through the door (I think yes)? And will it prevent followers from following me through (I have no idea)?

EDIT: The turrets are unaggressive too but they attack first...? Wait it's probably the aggro radius behavior on turrets isn't it? How do I get around turrets attacking neutrals within the agro-radius?

Or do I just have to make them aggressive and remove the aggro radius? How do I increase their "aggression range" if I have to do this?
User avatar
Brian Newman
 
Posts: 3466
Joined: Tue Oct 16, 2007 3:36 pm

Post » Tue May 17, 2011 5:00 am

I found that just adding the player faction does not work. And there appears to be no way to keep them from attacking Brahmin since they are friends of the Raiders. :shrug:
I ended up adding a bunch of factaion I did not want my placeable turrets to attack, being careful of the 'Brahmin faction bug' which makes the raiders friends to the turret.

Doors that you script with OnActivate blocks should prevent ALL NPC's from using it.
User avatar
Bloomer
 
Posts: 3435
Joined: Sun May 27, 2007 9:23 pm

Post » Tue May 17, 2011 7:12 am

So if you have followers they can't follow you through it? I'd test it but I don't have any followers...
User avatar
Joey Avelar
 
Posts: 3370
Joined: Sat Aug 11, 2007 11:11 am

Post » Tue May 17, 2011 11:59 am

I don't use followers. They either shoot me in the back or alert enemies to my presence when I am trying to sneak.
User avatar
Taylor Thompson
 
Posts: 3350
Joined: Fri Nov 16, 2007 5:19 am

Post » Tue May 17, 2011 2:09 am

Same here :) But other people do so I need to make sure it works.
User avatar
R.I.p MOmmy
 
Posts: 3463
Joined: Wed Sep 06, 2006 8:40 pm

Post » Tue May 17, 2011 2:11 am

Same here :) But other people do so I need to make sure it works.


You could try something like this on the door scripts (both sides, and an Xmarker on both sides)

ref rDoorUserBegin OnActivate	if (IsActionRef player)		Do stuff	else		set rDoorUser to GetActionRef		if (rDoorUser.GetPlayerTeammate)			if (rDoorUser.GetCurrentAIPackage == 1)	;follow				rDoorUser.Moveto XMarkerOnOtherSideOfDoorREF			endif		endif	endifEND 


Unless what WillieSea is saying is that the player activating the door will interrupt the follow package so that the NPC won't activate the door? That I don't know.
But the followers I script, and I've seen others do the same, is their quest script moves the follower to the player if for some reason they don't follow through a door.
User avatar
Cayal
 
Posts: 3398
Joined: Tue Jan 30, 2007 6:24 pm

Post » Tue May 17, 2011 11:33 am

Regarding the door, have a look at the Vault87Door Script. I think that's the correct name. There's also a Vault87Door faction (I can't rememebr the exact wording, off the top of my head). While I was making my follower mod I had to add him to that faction temporarily (I think), as well as edit him into the script. Otherwise he'd fire as soon as I finished Murder Pass and actually entered Vault 87. He couldn't follow me any further as the script wouldn't let him.

Maybe 'borrow' that script for your door.

That's the first thing I thought of when reading this.
User avatar
Colton Idonthavealastna
 
Posts: 3337
Joined: Sun Sep 30, 2007 2:13 am


Return to Fallout 3