Detecting weapon collision to open doors

wyvern14

L1: Registered
Sep 4, 2010
3
0
Hiya, lurker here looking for some advice.

I am making trapdoors in my TF2 map, and I want them to be shootable from below by other players, thus making them open. I successfully made the trapdoor and it opens correctly, but I'm at a loss to what kind of trigger to put underneath.

I couldn't use a func_breakable, since I want the door to reset itself after a few seconds and be shootable again. What to do?
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
I think you can use a func_breakable.

Just give it tons of health, then check OnTakeDamage instead of OnBreak to open the door. Also, OnTakeDamage, give it more health so it constantly regenerates.

Never tried it, but think that might work.

Kep
 

J4CK8

L11: Posh Member
Mar 4, 2009
820
243
You can use a func_button, set it's flags to don't move and shoot opens and then make sure the health is set to 0.
Set outputs to
OnDamaged OR OnOpen (I don't think it matters which); doorname; open
OnDamaged OR OnOpen; doorname; close; delay of whatever you want.
 

wyvern14

L1: Registered
Sep 4, 2010
3
0
You can use a func_button, set it's flags to don't move and shoot opens and then make sure the health is set to 0.
Set outputs to
OnDamaged OR OnOpen (I don't think it matters which); doorname; open
OnDamaged OR OnOpen; doorname; close; delay of whatever you want.

Zomg it works :D TYVM sir, you just saved my life :):):):)
 

Egan

aa
Feb 14, 2010
1,375
1,721
Or you could do it my way.

Make it a breakable and do all the stuff you'd normally do.
But also make a entity called "Point_Template"
Name it "TrapdoorTemplate"
In one of the template spots put in the name of your breakable.
Now make a "Logic_Auto" entity somewhere nearby.
On outputs tab: OnMapSpawn - TrapdoorTemplate - ForceSpawn

Now in the outputs tab for your trapdoor: OnBreak - TrapdoorTemplate - Forcespawn

YAY Your done.
Make sure to use different templates for different trapdoors, or they'll all spawn at once.

Note: If you spawn something multiple times, there will be multiples of themselves. (clones basically)