Automatic Doors

Tutorial collection, comprehensive listings on main site.

Automatic Doors

Postby Tutorial on Thu Dec 29, 2005 11:18 pm

category
General Half-Life 2/Entities

description
We rarely see automatic doors in Half-Life 2, but that doesn't mean they can't be made.

keywords
automatic, door, doors, sliding.

To understand this tutorial you must know how to make doors.

In this tutorial I am going to explain how to make a door that automatically closes 4 seconds after the player leaves the doorway and does not close if the player steps back in. I will be using a logic_compare and a trigger_multiple to get this effect.

Ok first make a wall with a door in it. Any kind of door should work. Make the door open however you want, I used 'Use Opens'. Name the door Door01 and set Delay before reset to -1 so it doesn't close itself.

Next create a brush the same size as your door, texture it with toolstrigger and tie it to trigger_multiple. You may want to move this outside of the door for easier selection, just remember to put it back before compile. Now create a logic_compare, you should put it near your door to make it easier to find. Name your logic_compare compare01.

Now for the inputs/outputs
-The trigger
This is used to set the compare's value to 0 when there is nobody in the trigger and set it to 1 when a player walks in. To change the time after which it compares to see if anyone is in the trigger just change the delay, mine is set to 4. The trigger also opens the doors when someone steps in, so if the player tries to step back in while they are closing the doors won't close on the player.

Image

-The compare
This is used to compare the value that was input (0 if the trigger is empty and 1 if the player(s) are in the trigger) against the comparevalue which is set to 0 by default. So when the door is empty and this entity gets triggered, the door will be told to close.

Image

And that's all!

- verballydecapitating
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby csidle on Wed Jan 03, 2007 3:45 pm

It's so simple! Thanks alot, it's very useful for us Star Wars mappers :)
csidle
Regular
Regular
 
Joined: Sun Aug 06, 2006 11:07 am

Return to Tutorials

Who is online

Users browsing this forum: No registered users

cron