Snarkpit Articles

Making a destroyable active tank turret (realistic).

Making an active tank turret that can be destroyed with explosive weapons.
1.

Get a tank (snarkpit or PFL could help with that) with a working turret (func_tankmortar or func_tank).Give the turrets name "turret" (d'oh).

Article image


2.

Make 2 extremly small func_breakables and make them invisible (rendermode : ADDITIVE; rendernt 0) and configure them like this (without the quotes):

Target: manager

Health: 100

Material: metal

Gibmodel: metalplate_green

Then place one of them in front of the turret (careful, it must not obstruct the muzzle) and the other above it.When the turret is hit by something explosive, the blast will surely damage the func_breakables.That way, you can only destroy the tank with a weapon that generates an explosion (let's be serious, can you really say that you can destroy a tank with an SMG in reality?), the chances of hitting the "sensors" by mistake being very low (and even if you do, it won't be enough to blast them apart).

3.

Make a multi_manager and set its targetname "manager", then add the following targets:

"explo1 (delay) 0

explo2 0.5

explo3 1"

4.

Ok, now add 3 env_explosions with their magnitude (lets say) 100 and place them around the turret.Name them "explo1", "explo2" and "explo3";

Since they will explode consecutively, you should place them in order on the turret, forming a perpendicular line with the tank's side.

Also, make a trigger_relay and set it like this:

Targetname: explo1

Killtarget: turret

This will make the turret disappear as if blown away.

NOTE: You should also make an env_shooter, also named "explo1", to shoot out some metalplate gibs.

5.

To complete the show, spawn a couple of env_sprites on the place of the turret , set their model "xffloor.spr" and name them "explo1" (again);

You should also add an ambient_generic to make the burning sound (ambience/burning1.wav) and an info_decal representing a scorch on the surface of the tank hull, where the turret used to be.

Discussion

Posted by Foxpup on Wed Dec 1st 2004 at 8:51am

I still don't know how they made the tanks in the original game, but this one's better.
Sulkdodds, 1) Just leave gibmodel blank, it's not really neccessary.
2) Put an origin brush in the centre of the turret. Make it part of the turret entity. It's a block with the "origin" texture on all sides in case you don't know.
Posted by Sulkdodds on Sun Feb 15th 2004 at 5:12pm

Er...I'm an idiot, but I get two problems.
1. The gibmodel 'metalplate_green' won't load.
2. The turret rotates not around its centre but around a central point which is at the end of the barrel, if you see what I mean.
Help?
Posted by Gollum on Wed Sep 17th 2003 at 6:34am

Neat idea and a clear, concise tutorial :)

A rendermode of "Solid" and amount 0 is what you should use to make something invisible. Regardless of the textures used on the entity, those settings will make it disappear (and not even be drawn by the engine).

"Additive" and "Texture" are special rendermodes that depend on using particular types of textures.
Posted by Loco on Tue Sep 16th 2003 at 6:51am

Render mode: texture would probably be better than additive, but otherwise great tut. At last, tanks are no longer destroyable with two shots from a crossbow!
Posted by blu_chze on Tue Sep 16th 2003 at 5:11am

proper tank-like set-up yay. viva la realism
if only they did something like this in the game-seriously destroying a tank with a shotgun and SMG? lets all have a luagh