Cleanup is going to take awhile, so the site is back up but editing has been disabled.
Striders Part II
From HalfLife 2 Knowledge Base
Contents |
by: Exitus
Precursor
Striders are one of the most formidable enemies in Half Life 2. You may remember them from the battle in front of the museum, or from various places in City 17. perhaps maybe you remember their reality-bending cannon from when you stared in awe as it blew up buildings? Want to do it yourself?
Well, this series of tutorials is going to cover the following things:
- Making striders walk
- Making striders crouch and walk under something and stand back up
- Making striders fire their reality-bending cannon
- Making a strider go on a war path
These 4 things will be split up into 3 tutorials.
Part I: Making a strider walk around, making striders crouch and walk under something and stand back up.
Part II: Making striders fire their reality-bending cannon, also making buildings blow up.
Part III: Making the strider war path. This will incorporate all previous tutorials and make one large path.
I will asume for this tutorial that you have already read Striders Part I.
Firing the Cannon
First, open up the map that you did the previous tutorial in. If you don't have that, just read the bold text. After the strider has gone under the bridge, just make a few more path_corners after the last one.
Next, make a scripted_target where you want the strider to fire at, and call it "strider_target". This is what the strider will shoot at.
Then, on the path_corner you want the strider to fire the cannon on, go to the outputs tab. Make a new output, and for the output name, put OnPass. (If you didn't do the last tutorial, just make a trigger_once and for the output name do OnTrigger). For the Target, do the name of the strider. For the target input, do SetCannonTarget, and with a parameter of the entity name of the entity that you want the strider to fire the cannon at.' This will cause the strider to fire the cannon. If you want it to fire at the player, put the parameter as !player.
Making the Collapsing Building
There are two ways that you can do this next section. You can make the pieces of the building from scratch, or you can use the Clipping Tool to create them. These pieces are what the building is going to fragment into after the strider fires at it.
First, just make the basic shell of the building. If you want to, you can hollow it out and add stuff, but if you add too much, all the items will get stuck together in what I like to call "Phys Glue" =) If you have ever played HL2DM on the map dm_overwatch and had a team fill the little staircase leading to the top floor with junk, you will know what I mean.
Next, select all the pieces and then select the Clipping Tool. Then, just drag a line from one edge to the other. Click on the Clipping Tool twice, or until both sides of the line are white. Do this maybe 3 or 4 times, but not too many. Make each individual piece into func_brush, and when you are done with that, select all of the pieces and give them the name of "building_pieces". Next, you need to make a phys_convert. fo the name, call it "building_converter", and set its target to "building_pieces". If it hasn't clicked in your head yet, the combination of the func_brushs and phys_convert will make it so that the building doesn't fall apart prematurely.
Then, make a env_explosion wherever you have the strider shooting at, and give it the name of "building_explosion". Experiment a bit with the "Magnitude" setting until you have a big enough of an explosion to blow all the pieces away. Also, make a scripted_target where you want the strider to fire at. Call it "strider_target". After that, make a 4x4x4 func_button very close to the scripted_target. Also assign it the nodraw texture. This is what is going to tell when the strider beam has hit and trigger the explosion. Call it "explosion_sensor". Go to the outputs tab, and make 3 new outsputs. Make them as follows:
(Output name, Target, Target Input, Parameter, Time)
- OnDamaged - building_converter - ConvertTarget - Blank - 0.00 -
- OnDamaged - building_explosion - Explode - Blank - 0.01 -
- OnDamaged - explosion_sensor - Kill - Blank - 0.10 -
The first one tells the converter to make the func_brushs into func_physboxs. The second tells the explosion to occur, and the last one removes the button from the game. Make sure that the explosion occurs before the sensor is killed.
So, when the strider attacks the building, it will blow up and pieces will fly everywhere and the strider will keep going along its path.
Thats it for now =)
Previous: Striders_Part_I

