nyuuzyou/wikis huggingface dataset:
WiseLaser

In this tutorial, we will approach basic aspects of using lasers in level design.
==Moving Laser==
The image to the right shows a laser that travels back and forth from both ends of a tunnel, and will kill the player if touched. The height of the tunnel is big enough for the player to be able to jump over the laser. The player can not go under the laser at this height however.
There are several ways to create an effect like this, the settings and methods that is used in this tutorial can easily be changed to your liking. Notice the sprite placed on each side for a burning hot effect.
There's a secondary ambient effect used in this tutorial, not related to the laser: a water puddle was created on the floor, and it will make a splash sound.
An env_beam is used on each side of the tunnel to create the moving laser:
===Setup in Hammer===
To the right there's a shot from Hammer of the left side env_sprite, env_beam, func_tracktrain and first path_track. 
Objects used
* Transparent = func_tracktrain
* Purple = env_beam
* Green = env_sprite
* Red = path_track
By looking at the image you can see the env_sprite is parented to the env_beam.
The env_beam is parented to the invisible func_tracktrain.
Our first path_track, the starting point, is nestled right in there with the other entities.
====env_sprite====
These are the settings for each env_sprite, which are only used for a slight effect.
====func_tracktrain====
Settings for each func_tracktrain:
====path_track====
Notice, in the image to the right, that there are only 4 path_track entities: two on each side, for each func_tracktrain.
On the left side the first path_track references the second path_track which in turn references the first path_track, which causes the lasers on each side to go in a loop, back and forth.
By adding more of these path_track's you could cause the laser to travel in a zigzag pattern. You could also attach multiple lasers to each side, for a double effect as an example. You are free to change the visual effect of the laser, its speed and the tiny sprite to your liking.
Settings for first path_track on the left side: 
==Water puddle==
The water puddle effect is done with an info_overlay. One can place an env_cubemap over this, an ambient_generic for the sound and a trigger_multiple to play the sound when the player steps there.
===Setup in Hammer===
====info_overlay====
====ambient_generic====
====trigger_multiple====
==Laser turning a corner==
The trick to making the laser turn a corner is to stop the inside train until the outside train catches up.
Take a look at the Outputs for the path_tracks in the corner, should be straight-forward.
The next step is to make the laser teleport to the first path_track so it can start over.
To do that just check the flag Teleport to this path_track, in both of the first ones.
The download for this tutorial contains two vmf projects.
In the second example the laser turns a corner and travels down another tunnel. Notice that no sprites were used in the second example, since it looked better without them.
== See also ==
* Example VMFs backup
Category:Level Design
WiseLayeredGlass

==Introduction==
A common feature of the windows you see in HL2 along the coast levels are windows that seal the house (area portals) and also create illusionary effects:
#From a little further away the window blocks your view.
#A little closer and the view through the window is clear.
#Break the glass and part of the frame breaks with it.
==Creation==
There are 4 glass panels and two dynamic props involved.
===Glass layers (From outside in)===
#func_illusionary panel 0.5 units thick. Textured on outer side with glass\glasswindow026a, inner side with dev\dev_windowportal
# panel 0.5 units thick. Textured on outer side with tools\toolsnodraw, inner side with lights\white002.
#Brush 0.5 units thick textured with tools\toolsareaportal.
# textured with glass\glasswindow017a. 
The func_breakable glass panel needs an Output to force the inner frame prop to change to its broken look:
	OnBreakName	window_bars	SetBodyGroup	1	0.00	No
===Frame parts===
*Outer frame is .
**World model: models/props_wasteland/plasterwall029c_window01a.mdl
**Disable Shadows: Yes
*Inner frame is also prop_dynamic.
**World model: models/props_wasteland/plasterwall029c_window01a_bars.mdl
**Disable Shadows: Yes
**Name: window_bars
**Collisions: Not Solid
**Randomly animate: No
**Body group: 0
**Start disabled: No
Notice when the inner frame spawns the Body group is set to 0. Once the glass panels are layered they will appear to be one unit and because they are only 0.5 units thick the overall thickness is only 2.0 units. The Transform tool is very helpful in creating and moving super thin brushes.
In the sample project below I’ve created all of the panels and a frame for them. I’ve left the brushwork spaced outside of the window, so you can practice.
==See also==
*Example VMF
*Example VMF backup
*Controlling Geometry Visibility and Compile Times
WiseLightShot

The first thing to consider is the prop you’re using. For this effect to work optimally the light prop should have more than one skin. Skins are used in props to change their appearance. Many light props have at least two skins, On and Off.
Skins in more detail.
For this project the HL2 Prop I’m using is models/props_c17/lamp_standard_off01.mdl. There are actually several methods you can use for this effect. For this project I’m using prop_physics for the lamp because we can add outputs to OnHealthChanged. When the lamp is shot the lights will now go out via our outputs but I’ve also added a bit extra with an env_shooter, which will toss some glass shards.
In the image above you can see:
#prop_physics with model models/props_c17/lamp_standard_off01.mdl
#env_shooter with model models/Gibs/Glass_shard.mdl
#light
#light_spot
#point_spotlight
Properties for the lamp (prop_physics):
*Name: lamp01
*World Model: models/props_c17/lamp_standard_off01.mdl
*Skin: 1
*Disable Shadows: Yes
	OnHealthChanged	Shooter01	Shoot 	 	0.00	No
	OnHealthChanged	light01 	TurnOff 	 	0.25	No
	OnHealthChanged	light02 	TurnOff 	 	0.25	No
	OnHealthChanged	lamp01 	Skin 	0	0.75	No
	OnHealthChanged	light03 	LightOff	 	0.75	No
Glass shard effect (env_shooter):
*Name: Shooter01
*Parent: lamp01
*Gib Direction: 0 0 0
*Number of Gibs: 3
*Gib Angle: 0 0 0
*Gib Velocity: 50
*Coarse Variance: 0.15
*Gib Life: 4
*Model: models/Gibs/Glass_shard.mdl
*Material Sound: Glass
*Simulate: Point
*Gib Skin: 0
A point_spotlight, for the cosmetic glow effects around the lightbulb:
*Name: light03
*Parent: lamp01
*Pitch: 90 0 0
*Spotlight length: 256
*Spotlight Width: 60
*Color: 238 232 221
*Flags: Start On, No Dynamic Light
Our light_spot, for directional light:
*Name: light02
*Pitch: 0 90 0
*Brightness: 238 232 221 60
*Appearance: Normal
*Inner: 0
*Outer: 54
Our light, for directional light:
*Name: light01
*Brightness: 238 232 221 60
*Appearance: Normal
==See also==
*Example VMF
*Example VMF backup
*Naming Lights
WiseLighthouse

This isn’t difficult at all and it’s not going to be a step by step tutorial because you should be able to download the file at the bottom of this page and load the source vmf in Hammer then use this example for your own purposes.
The lighthouse model used in this tutorial is only for appearance and it’s actually two SDK entities with the following World models:
#models\props_wasteland\lighthouse_fresnel_light_base.mdl
#models\props_wasteland\lighthouse_fresnel_light.mdl
The two models placed over each other give the appearance of the center light assembly from a lighthouse. Only one property needs to be changed, for the model that is the fake light change Collisions to Not Solid. You can also do this for the light base if players will not be around it. 
Now we’ll put our rotating spot lights in there.
First create a small block with the brush tool and tie it to entity .
*Name: LightBase
*Parent: Blank - Do not parent this!
*Origin: Give it the orientation you need, for this example it’s “-25.07 23.5 -590”
*Pitch Yaw Roll: 0 0 0
*Disable Shadows: No
*Max Rotating Speed: 100
*Friction: 20
*Rotating WAV Sound: None, we’ll use external sound
*Flags: Start on
For the sound we’ll use an and place it where it’s needed, where the player will be.
*Sound Name: npc/roller/mine/rmine_moveslow_loop1.wav
*Adjust the Flags for your needs, the only one checked for this example is Play Everywhere, but that’s because the example map is small.
Now create two entities, these are the lights and to save on system resources we’re going to turn off dynamic lighting for these.
*Parent: LightBase
*Pitch Yaw Roll: “19 358 0” and “15 170 0” in this example, a slight downward angle.
*Spotlight Legnth: 500
*Spotlight Width: 50
*Color: “250 248 143”
*Flags: Start on, No Dynamic Light
Place your two point_spotlights at each end of the func_rotating and you’re done.
==See also==
*Example VMF
*Example VMF backup
WiseLook

==Introduction==
Illustrated in this project:
#Player can see a Monitor on the wall.
#When the player gets closer, within the trigger, and looks at the monitor it will cause a gunshot to be heard and the NPC Citizen in the camera will appear to have been shot.
This is done with a entity. trigger_look is an entity used to trigger an event when the player looks at something. It fires OnTrigger when the player looks at the specified target entity for the set amount of time. The player needs to be inside of the trigger volume. When the player leaves the trigger or looks away from the target entity the clock resets. Additionally if the Use Velocity instead of facing flag is checked, it uses the player's velocity instead of the player's view, and determines when the player is moving toward the target entity. This is useful for triggering when the player is driving a vehicle towards something. These triggers are only designed for single-player HL2.
==Creation==
Shown below is the trigger_look volume I created for this project.
Notice the trigger area in the image above. When the player is inside this trigger and looks at the monitor the events will fire. The player can look at the monitor from outside the trigger and nothing will happen. This trigger entity is like other trigger entities and can be flagged for Player, NPC or Filtered contact types.
Shown here are the properties for the trigger_look used in this project.
*Start disabled: No
*Look Target: monitor_1
*Look Time: 0.5
*FieldOfView: 0.9
*Timeout: 0
*Flags: Fire once and Clients
	OnTrigger	gunsound	PlaySound		0.00	Yes
	OnTrigger	citizen1	SetHealth		0.10	Yes
Notice the timing used in these outputs. The is used to play the gunshot sound a fraction of a second before the NPC citizen dies, on camera.
Also notice that we could have added a pause in the properties for the trigger_look by adding a non-zero value to the property Timeout. This would be handy in a case like steps leading up to a door that will spring open.
==See also==
*Example VMF
*Example VMF backup
WiseMaterialScroll

About a year ago I created a sample project for HL2 with a moving sidewalk by using the entity. The material I used on that conveyor was props\rubberconveyorbelt001a. It looked like a conveyor but didn’t move (scroll) with the func_conveyor. Recently Chris Britt contacted me about a new VMT he had created for use with func_conveyor. As you may or may not know you can create your own VMT (Source material data) for any of the SDK materials, your custom VMT can reference any other VTF (Source texture), in fact many Source materials do this as it’s not only a means to experiment with material properties but can also provide more than one use for the same texture. You could for example have a single material that has the properties of Glass or Metal, by creating an additional VMT.
One change I made to Chris’s new VMT was this:
"$surfaceprop" "no_decal"
This is because the conveyor looked strange if it received impact damage, say for example from the shotgun. By adding this the conveyor no longer receives impact damage decals.
The completed VMT is shown below:
As you can see this new VMT still references the same VTF, props\rubberconveyorbelt001a.
There are two separate blocks of code properties in the proxies section.
===TextureScroll===
"texturescrollrate" "150"
This is very high. This is in units per second and normally you will not create scrolling textures that fast but it works out for the conveyor because it’s so long, with the func_conveyor set to a speed of 80 this new VMT works out well.
"texturescrollangle" "0.00"
This is the direction of the scroll effect. If for example you want the material to scroll down you would use -90 or 90 for scrolling up.
===ConveyorScroll===
This is only used by func_conveyor, no other entities.
To illustrate how simple this can be when you need a scrolling custom material I created a new material with transparency and a single horizontal red line.
If I use this new material with a normal VMT it will only be able to provide me with a line but by creating a VMT with scrolling properties for the same material will allow me to scroll my red line in any direction.
These are the properties for my red line:
To show how the same image can be used I’ve created an additional VMT:
Notice that both of these VMTs reference the same VTF, akg_redline_scroll. Also notice that my texturescrollrate is 0.3, much slower than the conveyor. In fact this is incredibly slow, but I’ve designed the image and these settings to be used in a 3D Skybox, which as you know is 1/16th scale.
==See also==
*Example VMF
*Example VMF backup
*Material Proxies
*Shader Types and Parameters
WiseNPC01

==Introduction==
To make the NPC look in a direction or to run and walk can be done with a .
In this example we are going to:
*Wake Alyx.
*Make her to look in our direction.
*Make her run far away.
*Finally she will walk back then die.
We are not going to use Face Poser for this. We are not going to use scripts that need to be loaded.
The first thing to do is place your NPC in the map and give it a name.
I’ve created a displacement for the floor area to illustrate something.
The entities on the ground are necessary and will not work if they are buried in the displacement. Raise them up above displacement floors.
For this example I’m using 3 scripted_sequence entities to control Alyx.
==Creation==
Give each of your scripted_sequence entities a name. Set the Target NPC property to the name of your NPC, in this example it’s alyx.
The Move to Position property is the one that will do the work for us.
For each of the 3 scripted_sequence entities Move to Position is:
*alyx_seq01 No - Turn to Face
*alyx_seq02 Run
*alyx_seq03 Walk
The scripted_sequence has a Next Script property you can use.
In this example our second scripted_sequence has alyx_seq03 specified for the Next Script. So when Alyx runs to script #2 she will then walk to #3.
To begin the sequence of events I’m using a . No changes are made to the logic_auto but these outputs are added:
 
 
 
 
 
 
 
On the ground between the scripted_sequence entities I’ve placed info_node_hint entities to give the NPC a walking path. Even with the scripted_sequence entities setup properly your NPC won’t walk or run without the info_node_hint entities.
At the final scripted_sequence I’ve created a to kill the NPC.
 
 
 
 
 
In each of these outputs alyx is the name of our NPC Alyx.
When the map loads the logic_auto will begin the sequences, when Alyx gets to sequence #2 it will activate sequence #3 and when Alyx gets to sequence #3 she will step into the trigger and activate the output above, which will cause her to die.
==See also==
*Example VMF
*Example VMF backup
Category:Level Design
WiseNPC02

Getting NPC’s to shoot at an area without a live target can be done with the entity. In this project I’ve created three Combine Soldier NPC’s:
#Shooting at a target from a window position.
#Shooting at a wide area from a roof position.
#Shooting at a wall that is bleeding.
Compile the vmf for this project, below, so you can see these three positions in action. The project file compiles in seconds.
We need two entities to make this work, the npc_bullseye for our NPC to shoot at and a to make it happen.
For the NPC in the window the is on the ground. Our NPC on the roof is shooting at a moving npc_bullseye, which is Parented to an invisible . Notice for each ai_relationship the Subject is a Combine Soldier and the Target is an npc_bullseye.
For each of these the Disposition property is set to Hate. The Radius is set to a wide area, 1200 for each of them. Disposition Priority is set very high, 999. Start Active is Yes for each. Reciprocal is No, the target does not hate the NPC.
The npc_bullseye can take damage but for all three of the ones in this project the Flag Take No Damage is checked. For the target on the wall the Bleed flag is checked, and as the Combine shoots at it the target will bleed on the wall.
Don’t worry about getting shot at, I’ve set a and used a to enable when the map spawns.
Compile the project vmf below, it’s an interesting show.
==See also==
*Example VMF
*Example VMF backup
WiseNPC03

In this tutorial we are going to transition from a directly into an . This project is an extension of WiseNPC01. I started with that vmf and added the ai_goal_actbusy, which will cause Alyx to kneel down. I used entities in this one rather than the more advanced entities so the one info_node_hint in this tutorial will stand out. Both of these are nodes for ground based NPC’s and serve the same basic purpose however info_node_hint has many more features.
There are two series of sequences going on in this project:
#A sound is heard, Alyx runs across the screen, walks back then kneels down in front of a grave.
#A Nova Prospect soldier is pacing back-and-forth behind the grave.
I added an ai_relationship so Alyx and the Combine Soldier won’t fight.
*Subject: combine01 (Name of the Combine Soldier)
*Target: walking (Name of Alyx in this project)
*Disposition: Neutral
*Disposition Priority: 100
*Start Active: Yes
*Reciprocal: Yes
So we can get Alyx to kneel an entity was added.
*Name: actbusy
*Actor to affect: walking
*Start Active: Yes
*Search Type: Entity Name
*Search range: 1200
*Visible Busy Hints Only: No
One info_node_hint was placed under the last scripted_sequence.
*Name: kneelhint
*Hint: World: Act Busy Hint
*Hint Activity: D1_C01a_Mary_kneel
*Node FOV: 360 Degrees
*Start Hint Disabled: No
*Ignore Facing: Yes
When Alyx gets to the last scripted_sequence this Output is fired:
	OnEndSequence	actbusy	ForceThisNPCToActBusy	walking	0.00	No
The pacing back-and-forth is done with two scripted_sequences. These Flags are checked on each of them: Repeatable, No Interruptions, Override AI.
The Target NPC for each of these is our npc_combine_s combine01. 
Move to Position is Walk for both.
These are the two Outputs that make it work:
	OnEndSequence	combiness02	BeginSequence	 	0.00	No
	OnEndSequence	combiness01	BeginSequence	 	0.00	No
On map spawn our adds this Output to start the Soldier pacing:
	OnMapSpawn	combiness01	BeginSequence		0.00	No
This project was simple to create but has a lot going on now. Compile it and have a look.
==See also==
*Example VMF
*Example VMF backup
WiseNPC04

I’m not sure how we should label . It’s not like other ground based NPC’s. Not only because it’s so tall but also because the AI is much different. It is a marvelous character to work with but you may do better to think of it along the lines of the helicopter.
There are three modes of attack for npc_strider:
#Minigun. (Able to shoot at a wide area.)
#Cannon. (Bluish beam that alters time and space.)
#Legs. (Used to impale players and citizens on the ground.)
When you use Striders in your map the surrounding geometry is very important. Since they are so tall you need to allow about 540 units. They are fairly wide so allow for 300 units. Keep in mind the Strider can crouch and it will step over very tall objects.
Placement of the and for Striders is in the air where the Strider will go through them. These can be stacked on top of each other so they look in Hammer like one object or you can place them next to each other, up to you.
The info_node_air_hint must be set to a Strider node.
In this example I’ve created 4 path_corner entities and each one has a info_node_air_hint placed under it. As mentioned the info_node_air_hint could be placed over the path_corner and grouped with it, this preference has no effect on the outcome in the game.
I haven’t set a starting path_corner for this Strider. We’ll set the starting path_corner with a trigger. The Strider in this example will go to the path_corner and then use each of them in the correct order, as specified in the properties for each path_corner.
As part of the shared AI for the Strider and Scanner you can use them together to suggest navigation as the can not only follow the Strider but can also relay target locations. ( features this.)
For the Strider in this example I haven’t changed any properties other than giving it a name. 
When the map starts we spawn the Strider with a .
*Name: strider_template
*Template 1: strider_1
*Flags: Preserve entity names
We also need to add an so the Strider has a disposition towards the Player.
*Name: ssrelation
*Subject: strider_1
*Target: !player
*Disposition: Neutral
*Disposition priority: 100
*Start Active: Yes
*Reciprocal: No
We will encourage the Strider to walk using an .
*Name: striderwalking
*Target NPC: strider_1
*All in radius: No
*AI state set to: Set state to ALERT
*Schedule to run: Walk Goal Path
*Interruptability: Death
*Goal entity: strider_1_path_1
In this example I’ve used a that the Player will spawn in.
Notice that from this one trigger all of the events for our Strider are fired off at once. The importance here is placed on the timing, which is done by simply adding delays as needed. With the Outputs above we now have:
#Strider spawns.
#Crouches down then stand.
#Begins its patrol route around the map in a circle.
#After one minute begins to Hate the Player.
#Once it finds the Player it will fire the Minigun and Cannon.
#Six seconds later it Likes the Player once more then Breaks into pieces.
==See also==
*Example VMF
*Example VMF backup