Prop_dynamic doors/gates - A quick guide

Tutorial collection, comprehensive listings on main site.

Prop_dynamic doors/gates - A quick guide

Postby Tutorial on Wed Jan 02, 2013 6:53 pm

category
General Half-Life 2/Entities

description
Quick guide on how to use prop_dynamic (such as a combine door) in your level.

keywords
combine, door, prop_dynamic, func_button, logic_branch.

Prop_dynamic doors/gates - A quick guide

Assumed Knowledge:
Basic Hammer Skills
You can create a brush based Button
Input/Output Usage

The door
Create a prop_dynamic entity in your level. I can recommend checking out the different sequences/animations to see how it looks like when it's open/closed. (Model Tab).
Name it something relevant as per good practice.
Image

In this example, I've named it d_combinegate.

The button
This is entirely up to you. There are many ways to create buttons in hammer and they work in much the same ways.
This is the simplest way that I can think of to create a button.

Create a func_button brush and give it an appropriate texture. You don't have to name the func_button brush.

The logic
Alright, this is the fun part. If you haven't checked out the sequence/animation names for your door/gate model, doing so now would be a good idea.

Create a Image logic_branch entity and name it m_combinegate_logic.
Set its initial value to 0 (false).

Image

Next, go into its output tab and set it up like the picture.
Image

Code: Select all
    OnFalse d_combinegate SetAnimation close 0.00 No
    OnTrue  d_combinegate SetAnimation open 0.00 No


Return of the button
Go back to your func_button brush and set up the output like so:

Image

Code: Select all
 OnPressed m_combinegate_logic ToggleTest <empty> 0.00 No


Relevant reading material
https://developer.valvesoftware.com/wiki/Prop_dynamic
https://developer.valvesoftware.com/wiki/Logic_branch

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

Return to Tutorials

Who is online

Users browsing this forum: No registered users