Please or Register to create posts and topics.

How to force doors to close?

Page 1 of 2Next

I have a door, the normal portal round door with a left and right side. I set the Force Closed property on both of them. Yet when I put a box between them and close the door, the box prevents them from closing. Indeed, I can stand in between them myself and also prevent them from closing.

How can I force the doors to close no matter what?

Well from what i've seen, I don't think you can force a door to close when there's a box propping it open. Though There's probably a way to get it to kill the player if it closes exactly on him.

Perhaps you can put a trigger in the door way and make it detect boxes, and some how push the boxes out of the doorway, not sure how sorry this is just theory.

Walking when you have a portal gun sucks.

Check out my Portal 2 map, Entrapment!
http://forums.thinking.withportals.com/community-releases/entrapment-1-1-1-t2323.html
Lorithad wrote:
...There's probably a way to get it to kill the player if it closes exactly on him.

Yes, sir:

[img]http://www.nacimota.com/door.jpg[/img]

Is 'like, a billion' a valid numerical constant in Hammer?

And while this would definitely stop the player from propping the door open, I'm pretty sure it wouldn't help with boxes. Damage only affects props that are designed to be breakable, and the Aperture Science Weighted Storage Cube is not among them. So you'll have to use the door's OnBlockedClosing output to rig up a separate solution for cubes and other physics props. Maybe you could create a fizzler in the doorway that turns on temporarily when an object needs to be removed. It's all up to you how you want the game to handle it.

I *think* that OnBlockedClosing's activator is the object that blocks it... so you might be able to just !activator -> Kill for physobjs.

Not sure if this works though, and it might not be the ideal solution.

Hunter wrote:
Is 'like, a billion' a valid numerical constant in Hammer?...

No, sir, it is not.

In this particular case, the cube is actually companion cube that the player is supposed to carry to the end. So I'm loathe to destroy it because then I have to come up with some way to create or obtain another one. Whereas I quite like the idea that you only get the one cube.

What if the doors blocking brushes were wedges, or angled so that when they close, the cube would get pushed and twisted - preventing it from becoming stuck.

taco wrote:
What if the doors blocking brushes were wedges, or angled so that when they close, the cube would get pushed and twisted - preventing it from becoming stuck.

You know, that sounds like it should work. The problem is that I'm not sure you could make a single shape that would pop the cube out in all circumstances.

If you need the player to keep the cube, your best bet might be to go with Beerage's idea. There's something called trigger_push. Place one in the door frame, set the push direction to point toward the puzzle, and make sure the "Applies to Physics Objects" flag is checked. Then add the following outputs:

door.OnBlockedClosing = { door.Open; trigger.Enable; }
trigger.OnEndTouchAll = { door.Close; trigger.Disable; }

Page 1 of 2Next