How can I make doors open only if a control point is owned?

mishi

L1: Registered
Jan 30, 2014
38
3
Hey all,
there's probably a guide somewhere that explains how I can make doors open only if a team owns a certain control point. I've googled and used the forum search but couldn't find anything useful, so if someone could explain how to do it or link me a page that'd be great :)
It'd also be nice if there is some way to indicate that a door will only open if point xyz is owned, how could I do that?
Thanks!
 
D

Digaag Wa Riz

Control points have an output called "OnCapReset" that is fired when the point becomes neutral. You can send an input to the door(s) you want affected by the state of the control point to close when this output is fired. You can also open the door(s) with the output "OnCapTeam1" (RED) or "OnCapTeam2".

EDIT: To be more specific, you can give each control point it's own output for when it is captured/neutral so you can control specific doors. Open the properties window of the team_control_point and go to the "Output" tab.
 
Last edited by a moderator:

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
Have 2 triggers, 1 for red and 1 for blue. On capture you disable the trigger of the enemy team and enable the trigger of those owning the cp. The triggers itself have a teamfilter that only allows that specific team (that means 2 filters are required).

For indicating of a door will only open for a team there are multiple ways but its probably done the nicest way using a prop that changes the team color (by changing its skin). But maybe a respawnroom visualizer could do the trick aswel.
 

mishi

L1: Registered
Jan 30, 2014
38
3
I'm afraid I'll need the absolute noob explanation, I'm doing sth wrong. So I go to the trigger_capture_area of the control point A. If point A is owned by Blu, I want the blue door to be usable. In the output tab of the trigger_capture_area I select:

My Output: OnCapTeam2
Target entity: door_blu_large_1 (which is the func_door entity that isn't being rendered)
Target: Open (or Unlock? Both didn't work)

My Output: OnCapTeam1
Target entity: door_blu_large_1
Target: Close
 

Crash

func_nerd
aa
Mar 1, 2010
3,315
5,499
If you want it to be able to be opened after cap but not before, have the trigger set to Start Disabled (Yes) and when it's capped have it OnCapTeam<whatever>, <trigger's name>, Enable. That way it doesn't do anything before that point, but after the capture, it allows the door to open.
 

henke37

aa
Sep 23, 2011
2,075
515
But how do you best lock a door? The kind that opens when people are next to it that is. You obviously don't want to cause trouble when there are people around at the instant where you lock it.
 

Crash

func_nerd
aa
Mar 1, 2010
3,315
5,499
Oh, I was thinking of it as a one time capture type thing, missed that part.

On recapture, disable the trigger and close the door.

If you want to get fancy and avoid any chance of making a player stuck in the door (looking at you, Valve) you can enable a trigger hurt inside the door or a teleport to just outside the door, depending on how malevolent you are feeling.