Combine Gate Construction

Half-Life 2 HL2
Combine Gate Construction by BJ
Posted 14 years ago2006-12-16 15:26:16 UTC • Examples • Half-Life 2
Loading...
Screenshot Thumbnail
Name
Combine Gate Construction
By
BJ BJ
Type
Map
Engine
Source
Game
Half-Life 2
Category
Examples
Included
BSP, RMF/VMF
Created
14 years ago2006-12-16 15:26:16 UTC
Updated
14 years ago2006-12-16 15:30:30 UTC
Views
4306
Downloads
849
Comments
2
Download

Building a Triggerable Combine Gate

(This description is provided in entirety in the zip file. It's truncated only in this map vault description)

The setup for a Combine Gate with sound and damage which can be turned on and off (triggerable) is described in simple construction steps.

A combine fence is provided ready-made by adding an entity prefab: Prefabs HL2/combine_shieldwall. The elements of the prefab can be ungrouped and modified as desired (to change entity names, trigger types, etc.).

The prefab is also described more briefly at http://developer.valvesoftware.com/wiki/Combine_shieldwall.

The steps described below correspond to the 6 setups provided in the map from left to right.

Step 1
Position 2 prop_dynamic entities, one with a World Model of combine_fence01a, the other with combine_fence01b. Give them recognizable names.

Add 2 logic_relay entities, one to turn the fence on, the other to turn the fence off. Give them recognizable names.

For the logic_relay that's to be the ON relay, add two OnTrigger outputs, each targeting one of the two fence props. Select the fence prop's input Skin with a parameter of 0 (zero, zed). The "0" skin for the fence props shows blue-green lights and the smokey animated texture along the vertical edge of the fence.

For the logic_relay that's to be the OFF relay, add two OnTrigger outputs, each targeting one of the two fence props. Select the fince prop's input Skin with a parameter of 1 (one). The "1" skin for the fence props has no lights or animated edge texture.

For the purpose of this example map, a func_button has been added to trigger the ON and OFF logic_relays. The func_button flags Don't Move, Toggle and Use Activates are set (ticked). Add two outputs to the func_button:
  • OnIn targetting the OFF relay input Trigger.
  • OnOut targetting the ON relay input Trigger.
At this point, if the map is compiled and run, the fences will start in the ON configuration, lights lit and the animated edge texture active. USE the func_button to turn the fence on and off. The space between the fenceposts is empty (no animated texture) and there's nothing preventing the player from walking through the fence whether it's on or off.

Step 2
Add a brush to the area between the fenceposts using the effects/combineshield/comshieldwall2 texture. Tie the brush to a func_brush entity and give it a name. Set (tick) the flag Ignore player + USE. Set the properties Disable Shadows to Yes and Solidity to Never Solid.

Add to the ON relay an OnTrigger output, targetting the func_brush input Enable.

Add to the OFF relay an OnTrigger output, targetting the func_brush input Disable.

Now the fence has an animated texture between the posts which will turn on and off along with the fenceposts. However, the player can still walk through the fence unimpeded.

Step 3
To prevent the player from going through the fence when it's on, add a brush textured with tools/toolsplayerclip to the area between the posts. Tie the brush to a func_brush entity and give it a name.

Add to the ON relay an OnTrigger output, targetting the clip func_brush input Enable.

Add to the OFF relay an OnTrigger output, targetting the clip func_brush input Disable.

The fence will now prevent the player from walking through when it is on, and permit passage when the fence is off.

At this point, the fence is silent.

Step 4
Add an ambient_generic entity, positioning it near the center area of the fence and give it a name. Set the Sound Name to d3_citadel.shield_loop and make sure the flags Is Not Looped and Start Silent are NOT set (not ticked). Adjust the range of the sound to an appropriate radius.

Add to the ON relay an OnTrigger output, targetting the ambient_generic input StartSound.

Add to the OFF relay an OnTrigger output, targetting the ambient_generic input StopSound.

Now the fence will hum when it's on and be silent when it's off.

At this point, the fence could be used in a map by providing appropriate ON and OFF triggers triggering the ON and OFF logic_relays.

If it's desired to add damage from walking into the fence when it's on, continue with the next step.

Step 5
Add a brush with the tools/toolstrigger texture to the area between the fenceposts. Tie the brush to a trigger_hurt entity and give it a name. Set the Damage property to the desired level.

Add to the ON relay an OnTrigger output, targetting the trigger_hurt input Enable.

Add to the OFF relay an OnTrigger output, targetting the trigger_hurt input Disable.

When the player attempts to walk through the fence, damage will occur.

If it's desired to provide an audible warning to the player that s/he's approaching the fence, continue with the next step.

Step 6
Add another ambient_generic, give it a name and set the Sound Name to d3_citadel.shield_touch_loop. Set (tick) the flag Start Silent and make su

2 Comments

Commented 14 years ago2006-12-17 15:51:32 UTC Comment #13735
I've tried to do this several times and I've never succeded.
I'm gonna download this and have a look at it as fast as I get some freetime!

I <3 your examplemaps BJ, FTW!
Commented 14 years ago2006-12-17 15:57:42 UTC Comment #13736
Glad you find the examples useful, mad.

If you construct the gate in simple steps (as shown in the map and description), it's actually pretty simple.

Lemme know if it doesn't work for you.

You must log in to post a comment. You can login or register a new account.