Doors on a timer

TravisTouchdown

L2: Junior Member
Apr 15, 2013
68
5
Sorry I wanted to get back to you sooner but I have been under the weather.

I want to see if I got this right because I dont know the first thing about adding in timers

My doors are called door1 and door2. I set there delay Delay Before Reset to 30. Do I need to do anything else to the doors?

I added in the logic_timer but what do you mean by fire the open input? I clicked on the input tab but its blank.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
Well first, a watch the video below on Inputs and Outputs, though in short, any command an entity sends out to another entity is an Output, and anything received by an entity is an input.

View: https://youtu.be/_8iPGfg117I


The logic_timer can send an 'OnTimer' output. In this case, we need it to send an 'Open' command to your doors, which the doors will receive as an input. You'll want to go to the 'Output's tab of your logic timer, and set it as follows:
Code:
My Output named: OnTimer
Target Entity named: Door1
Via this input: Open
with a parameter override of: <name>
After a delay in seconds of: 0.00
You won't need to set a parameter as the 'Open' command doesn't need any extra info, and you won't need a delay as your already using a timer to.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
you may want to also add a trigger hurt inside, that gets enabled when the doors close, so that players don't get stuck inside
No need, func_doors already have a 'Blocking Damage' field and can be set to 'Force Close'. Using both will mean the door will close and crush anyone stood in it's way. The only time it won't kill players is when they have Godmode, either form using sv_cheats 1 or using SourceMod.
 

Etasus

L420: High Member
Jul 24, 2016
463
251
No need, func_doors already have a 'Blocking Damage' field and can be set to 'Force Close'. Using both will mean the door will close and crush anyone stood in it's way. The only time it won't kill players is when they have Godmode, either form using sv_cheats 1 or using SourceMod.
no, Im talking about when the doors close, and the players are still in the room. allegedly, there is only one door, and it opens on a timer. It would be more than anoying to be trapped in there with no escape, even by death
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
Well in that case might be easier to have a trigger_hurt or trigger_teleport(s, one for each team) to either kill players in the room or move them somewhere safe. In either case, set them to Enable when the door is OnFullyClosed and disable 0.50 seconds later.
 

Diva Dan

hello!
aa
Mar 20, 2016
1,024
1,951
This is very important if you want the doors to continue opening and closing forever.

First, you have to have a logic_relay with the output of opening the door, and and output of closing the door after a delay of 30 seconds.

Then, create an output that also has a delay of 30 seconds and have it trigger ANOTHER logic relay. Inside of the second relay, add an output to trigger the first relay with a delay of 300 seconds (5 minutes).

This creates an I/O loop. When one thing activates, then so will the other, then back, etc. However, it will start inactive, since you have nothing to set off the loop. So, create a logic_auto that triggers the second relay when the round starts. This will being the 5 minute timer and the loop will continue forever until the next round starts.

I hope this helps!
 

TravisTouchdown

L2: Junior Member
Apr 15, 2013
68
5
Thank you for the video. I have a better understanding about it now.

Ok so I have it set to open on 300 ( am guessing that is 300 seconds so 5 minuets)

I unchecked the box that says to open on touch so im hoping that dont cause any trouble

I also set a start sound wav that is a game sound that is 35 seconds long so I will just everyone to get in and out before the sound stops.
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
First, you have to have a logic_relay with the output of opening the door, and and output of closing the door after a delay of 30 seconds.

Then, ... This creates an I/O loop.
None of that is necessary. Werewolf's solution is the most elegant as it only requires one entity, logic_timer, which is an entity designed to do just what you are talking about. It works continuously, firing its outputs every time it reaches the end of its timer. It will open and close the doors every five minutes, or whatever the mapper has set.

Advanced: Doors themselves can be given outputs that fire when they are fully open, begin to open, begin to close or are fully closed. You could give the doors an output that opens them again after a four minute delay, and begin their cycle using your team_round_timer or logic_auto if you have one, or any other existing entity that is manipulated at the beginning of the round. Note that you do not need to name your doors differently. You could give them the same name (e.g. door1) and they would both respond to a single output, saving the need for separate outputs that control them independently.
 

TravisTouchdown

L2: Junior Member
Apr 15, 2013
68
5
I think I have done something wrong.

I made my door and I called it Door1. I set the flag to not allow open on touch because I want it opened on timer only. I set my delay before restart to 45 seconds because I want them to stay open for 45 seconds. I add in my logic timer and set it to ontimer door1 open. The door opens just fine. The trouble now is that the door dont close, it floats out of my map.

2itjuo6.jpg
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
Take a screenshot of the object properties window for your door and your timer (Hint: Alt + PrtScn can be used to take a screenshot of just the currently selected window)

Post both images here.
 

henke37

aa
Sep 23, 2011
2,075
515
That origin is questionable.