Cleanup is going to take awhile, so the site is back up but editing has been disabled.

Mortar

From HalfLife 2 Knowledge Base

Jump to: navigation, search

A tut by Jimius

This tut will cover how to make your own mortar (remember the beams of light coming down and knocking you upside down on your ass across the bank?). ALSO SORTA WORKS IN HL2DM (read the notes).

Contents

Making the mortar

My method will be one which works and is recreatable everytime. Make a cylinder with a nodraw tex on it, size is not really important but about as wide as an info_player_start and half it's height would be about good. now place it in the air so that it is in line with the upper part of the players body (so you don't have to duck to activate it). Make sure it's selected and press ctrl+t and tie it to a func_tankmortar. Now scroll through the settings, name the control volume mortarcontrol or something obvious, set horizontal to 0 and vertical to 1, setting any sprites doesn't seem to be nessecary but if you are not getting the beam etc ingame set the smoke sprite to smoke.vtf and the other to crystalbeam.vtf. The rest is optional so knock yourself out (don't forget the sounds). Make sure "active" and "controllable" are turned on in the flags, "non-solid" is optional and may be nessecary depending on your placement.

Making the control volume

Make a box, and put a trigger tex on it, ctrl+t, tie it to a trigger_multiple and set the name to what you named the control volume in func_tankmortar. place the box on the side of the func_tankmortar where you want the player to be able to control it. Make sure it's close enough to it.

Setting the origin

This method doesn't give a shit where the beam is coming from, at least on a vertical axis. Import a model of a turd (or you could use props_combine/combine_mortar.mdl) and place it ABOVE the func_tankmortar (more on this later). Now select the func_tankmortar and drag the whit circle in it's center up, do not go sideways! The whire circle represents the origin of the mortar beam, so place it so that it shoots out of your turd model in a nice manner, and move the model around to get it just perfect, DON'T MOVE THE CIRCLE SIDEWAYS!

Compile and your done

Walk up to where you placed the func_tankmortar and stand in the control volume (both invisible, it helps to place the func_tankmortar on a wall, or place the prop_combine/combine_binoculars.mdl underneath it) and press USE, now just click where you want the ownage to strike down on some ignorant NPC

Notes

Sorta works in HL2DM?
Yeah, unlike SP where Gordon puts down his gun and gets exclusive control over the mortar, MP will make you shoot your equipped weapon as well (so you fire both mortar and equipped weapon) but it's bugged, like the Pistol suddenly shoots like 8 bullets at a time and the clipsize seems to be disregarded. I'm not much of an HL2DM mapper, so maybe someone can find a solution to this, like forcing the gravgun to be equipped when a player is within the control volume. Some HL2Worlders may remember dm_mortar I made which was the first on-line test and proof that it work, also, if you want more than 1 mortar in a map, make sure to change the name of the control volume, or your copy simply won't work.

Why not move the circle sideways?
Because the func_tankmortar revolves around it when you are looking around, meaning that when you keep the vertical axis the same (length is not an isseu) the func_tankmortar (which we made a cilinder in the first place) will turn but not move out of it's place. When you move the white circle sideways the func_tankmortar does move around, and since it's invisible it'll be hard to find, and may become out of reach from the control volume. I've tried other shapes like a torus (with the center behind the player) but for some odd reason this only works when crouched, looking directly up and pressing use. But everybody is free to experiment.

Example map at http://www.hl2world.com/bbs/dload.php?action=file&file_id=662

Personal tools