Jump to content

Locked gates (NPC)


worldofscotty

Recommended Posts

I'm working on a mod. I wont go too in depth as it's not necessary.

 

Basically I have a gate. On the gate are two guards armed to the teeth. The gate can be opened with a key and the gate I set the gate the same faction as the guards and the guards drop the key to the gate.

 

When I attack one he pulls out his weapon and begins to run about shooting at me. 9 times out of 10 him or one of the other local militia run through the gate opening it while attacking.

 

Other than moving the gate or the guards is there any way to stop this from happening as I really want the guards stood at the gate if possible.

 

Ideally perhaps the guards stay completely static and shoot no matter when I go

 

Thanks in advance

Edited by worldofscotty
Link to comment
Share on other sites

Maybe you could create an extended faction i.e factionOfficers that the guards are not a member of so they can’t open the gate only members of the factionOfficers can open it.
Link to comment
Share on other sites

Thanks for the help. I'm still working on this though.

 

You can't set humans to not open gates like you can creatures easily

 

If I enchant their armour to 0 movement speed then they cant pick up their gun when it inevitably gets shot out of their hands. As they aren't on respawn this is permanent.

 

The faction thing didn't work. I set the gate to an entirely different faction but having the key in inventory means they can auto open it

 

I took the key from their inventory and they could no longer open the gate so I am trying to work on making them not have the key bit drop the key when they die.

 

I think it needs to be a leveled as right now it is not on the list

Edited by worldofscotty
Link to comment
Share on other sites

Hmm, I see.

 

That should work, remove the key from their actual inventory, then make a leveled item that contains only the key (and a 100% drop rate) and add it as a "death item" (they will drop it when they die). There is a function for that on NPCs i'm sure of it.

Link to comment
Share on other sites

Try putting a script on the gate

 

scn MyGateScript

ref rActorREF

BEGIN ONActivate

set rActorREF to GetActionREF
if rActorREF == Player
	Activate
elseif rActorREF.GetPlayerTeammate
	Activate
else		;else nothing
endif

END

Link to comment
Share on other sites

  • Recently Browsing   0 members

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