All basic tutorials are exactly that: basic. They are step by step guides
through each operation, hopefully fully illustrated. Experienced mappers may
find these tedious, but they are essentially designed for newbies :-)
In this tutorial I have tried to show how to set up scripted_sequences. These are set pieces of animation that are included in the game models. In this example Alyx will walk to a spot, do a cartwheel and then go and sit. Barney at the same time will go to a spot, wave and then go and sit down. You can see the various sequences available for each model in the Model Viewer.
model viewer
- The model viewer is in c:\program files\valve\steam\steamapps\yourname\sourcesdk\bin and is called hlmv.exe. If you run it this screen will open:
- Click on file | load model and it will open the root directory of models where many of them are kept. Double click on one and they will appear in the viewer.
- Click on the Sequences tab, and in the drop down there is a long list of
animations. Click on one and it will be shown in the viewer.
If you do a search here,there is some more information.
- Open Hammer and either load up a room or make one 512 x 512 x 256h, texture it and put an Info_player_start in and some lights if you want them.
- Click on the Entity tool and put and NPC_Alyx and an NPC_Barney in the map on the right hand side.
- Open the Properties for NPC_Barney and give it the Name barney
- Open the Properties for NPC_Alyx and give it the Name alyx
- Click on the Entity tool and select scripted_sequence
- Place four of these in the map, roughly as in the picture
- Select the scripted_sequences and name them script_1 2 3 4 as shown.
- Open the Properties for script_1
Target NPC barney
Action Animation wave
Move to Position Walk
Next Script script_2
- Open the Properties for script_2
Target NPC barney
Action Animation sit_chair
Post Action Ide Animation sit_chair
Move to Position run
- Open the Flags tab and check Loop in Post Idle (This ensures that Barney remains seated)
- Open the Properties for script_3
Target NPC alyx
Action Animation flipleft
Move to Position Walk
Next Script script_4
- Open the Properties for script_4
Target NPC alyx
Action Animation sit_chair
Post Action Ide Animation sit_chair
Move to Position run
- Open the Flags tab and check Loop in Post Idle (This ensures that Alyx remains seated)
- Just to the left of script_2 and 4 make small brushes, 16 x 32 x16 high. These are where Barney and Alyx will sit.
We'll put a trigger in and set up the inputs and outputs.
- Click on the Entity tool and place a weapon_shotgun
- Open the Properties and click on Outputs, click Add. Enter the following:
These start both the scripted_sequences
- Open the Properties of script_1 click on Outputs click Add enter the following:
- Open the Properties of script_3 click on Outputs click Add enter the following:
- Compile and run the map.
The next tutorial is
"36. Citizen Screams and Runs" and can be found
here.
Return to the top of the page