[Tutorial] TOW missle system

Setting up the TOW is very simular to the way the 50. cal works. The difference is that the TOW’s ammo is fed manually by the player.

  1. Create a prop_dynamic
    Name: tow_launcher_model
    Model: models/props_marines/tow_missile_system.mdl

  2. Create a brush behind the TOW model in which the player can stand and turn it into func_multiple.
    Name: tow_control
    Tag Flags: Clients

  3. Create a brush ( l:64, w:16, h:8 ) with the toolsinvisible texture and make it cover the length of the barrel. Turn it into a func_tow. Make sure the origin of this brush is moved to the middle of the TOW model, right at the pivot where it can rotate and move up and down. Turn the angle in the direction of the brush according to the direction of the model.

Name: tow_launcher
Parent: tow_launcher_model
Control Volume: tow_control

These settings control the movement range (Yaw=horizontal, pitch=vertical):
Yaw rate: 45
Yaw range: 120
Pitch rate: 45
Pitch range: 15

These settings connect the model animations to the func_tow:
Gun Base Attachment: animation
Gun Barrel Attachment: muzzle
Gun Yaw Post Param: aim_yaw
Gun pitch Pose Param: aim_pitch

Tag Flags: Active, Only Direct, Controllable, Non-Solid.

  1. Now place a few item_tow_missle entities around. These are the missles to feed into the launcher. You should be left with something simular to this:

Compile and witness the destruction!

  1. If you want the TOW to have more ammo, you can set up a missle spawner. Create an npc_maker.
    Name: tow_spawner
    Numb. of NPCs: 50
    Class name of spawned NPC: item_tow_missile (type, don’t select from menu)

Now go into the func_tow’s output and enter:
OnFire > tow_spawner > Spawn (Delay: 3)

  1. You can also set up the TOW to be NPC controlled, although only the player can reload the weapon, so enemy grunts can only fire one shot, which makes them pretty useless. In theory you could set up a friendly NPC to control the launcher, so the player can reload the weapon while he fires, although it seems Barney doesn’t want to control the TOW in the current version of BM. You might be able to come up with some clever solution like a model replacement of a grunt with ai_relations or something. If you really want to set up a NPC controlled TOW, refer the the example RMF below.

Example RMF

Damn you’re fast with things like this.
Are you also gonna make a tutorial to kill a Garg?

Sometimes when I have to figure something out for my own project, I also write a tutorial in the process, so I can share that knowledge with other people. Thusfar I have not used a garg, so there is no tutorial about that, yet.

If it works the same as in HL1, killing a garg is handled code-wise mostly. It’s probably precoded to only take damage from explosives. But I’ll have to look into that first to make sure.

… actually the devs rigged it to only be killed by scripted sequences, doesn’t matter how much ammunition you throw at it, it won’t die.

Hmm… that surely complicates things. I do have some ideas for a work-around, though. I’ll fiddle around a bit and see if I can get it to work.

Little update on the garg question:

I’ve been experimenting but apparently the garg is only set up to work in scripted sequences. The entity supports no parents so you can’t manualy add sequences or explosions to him. Plus, it has only very specific death animations, which would look odd in a normal fight. Even if you came up with a creative way for it to take damage, it would still look dodgy when he dies.

With a little luck the Dev’s update the Garg with proper animations and health system for the Xen update.

Found a convar “sk_debug_gargantua_death” it’ll die to explosives then, and just turn into gibs (no explosions, etc), but beyond that, I can’t do anything more. Gotta agree with you Hezus, I do hope they add that in later on.

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.