Trap door

Kirko

L2: Junior Member
Jan 16, 2008
58
0
I want to make a trap door in the floor that can be opened by pressing the "use" button(E). I want the door when your above it to open upwards when you press "use". Then when you are under it I want it to fall down from the bottom. I want it to have a timer for it to automatically close too because it will be held by a spring so when u open it from underneath and pull it down there will be a spring that will push it up then when ur above it will just fall down to where the spring holds it in place. So is this possible?
 

MangyCarface

Mapper
aa
Feb 26, 2008
1,626
1,325
So you want a hinged door that opens upwards when you're above it? Not sure why, shouldn't it be the other way around? Anyway take the brush you're using for the door, make it a func_door_rotating and move its origin to the edge you want it to hinge upon. Make two triggers_multiples, below and above the door. Finally add a logic_branch. Now check the flag on the door that says ignore use or whatever. Add an output on the door that says on use test the logic_branch. Now go to the trigger above the door and an output saying on player enter set logic_branch to true. Add another one for the bottom trigger that sets it to false. Finally add two outputs to the logic branch, ontrue make the door open up, onfalse make the door open down. To make the door "spring" shut fool around with the "wait" keyvalue on the door. Try using the setspeed input on the door with a negative value to achieve the direction switch. Hope this helps you
 

MangyCarface

Mapper
aa
Feb 26, 2008
1,626
1,325
Also, to do your spring effect, use a pair of cables (move_rope and keyframe_rope entities) with the flags auto resize selected. Then increase their width and change their texture to make them look spring-y. Parent the move_ropes, which should be positioned on the side of the door furthest from its hinge, to the door. Keep their corresponding keyframes in the frame of the door.
 

Kirko

L2: Junior Member
Jan 16, 2008
58
0
Thanks

Yeah upwards when you're above it like you grab it by a handle and lift then drop down. then it will fall down after u go through. It would be weird to push down on a spring pushed door and going down without the door hitting u in the face in reality.