THE HANDY VANDAL'S ALMANAC
Game Design Resources for Half-Life
Home : Topics : Menu : Reviews
Almanac 2 : Xen Rebels

Site no longer actively maintained ... HV

"It's Not How Much You Frag -- It's How You Frag"
 

TANKS
See also:
Updated May 15, 2002 - 8:27 AM

 

The Func_Tank Entities

  • Func_Tank - "bang" - machines guns, tanks & cannon
  • Func_TankLaser - "zap" - beam weapons
  • Func_TankMortar - "boom"
  • Func_TankRocket - "whoosh, boom" - rocket launcher
  • Func_TankControls - allows player to use tank, tanklaser, tankmortar

Machines guns, tanks guns, etc. -- how they work --

Use several brushes for the visible portion of the gun, plus an origin brush to orient the gun, all made into one func_tank entity, with properties set for the kind of gun desired.

You may want additional non-entity brushes, e.g. machine gun tripod. Note that the legs of the tripod meet at the gun's pivot point, which is the center of the origin brush.

(This is crucial. Make sure you've got an origin brush in the right place, whenever an entity requires one.)

func_tankcontrols entity

The func_tank entities are composite entities -- you need an origin brush in addition to the visible brushes.

Also, if the player is going to control the thing you need a func_tankcontrols brush.

When the player is partly inside the invisible tankcontrols field, using the Use key activates the gun. (But apparently, the effect doesn't work if the player is entirely inside the func_tankcontrols field -- so make sure the field is in the right place, and not too big.)

 

Guns Manned by Enemies

A Func_Tank weapon without Func_TankControls automatically targets the player. You can use another entity's killtarget property to disable the Func_Tank.

Consider the rocket-launcher sequence in HL's "On the Rail"

  • func_tankrocket
  • grunt in "prisoner" mode standing next to it
  • grunt's killtarget flag set to the same name as the func_tankrocket
  • so when the grunt dies, he "kills" the func_tankrocket, i.e. the tankrocket shuts down.

See also Scripting page

 
 

Is it possible to have a train (or other moving object) with turrets?

Not possible -- an entity can only be one entity type -- so your object can be a func_train, or a func_tank, but not both.

It is possible to simulate the effect ...

  • Make a func_train entity
  • Make an invisible func_tank entity, positioned exactly where the func_train will stop
  • Move the func_train into position, use env_render to make it invisible
  • Use env_render to make the func_tank visible

 

 
TANKS
Handy Vandal's Almanac Logo

"Handy Vandal" and "Handy Vandal's Almanac" copyright 2008 by Karl Gregory Jones
Almanac: Half-Life : Half-Life 2
Xen Rebels
karljones.com
Contact the Handy Vandal

Half-Life © 1998-99 Sierra On-line and Valve L.L.C. All rights reserved. Half-Life and the Half-Life logo are trademarks of Sierra On-Line. Valve and the Valve logo are trademarks of Valve L.L.C. Half-Life images, textures, music, sound effects, and other graphic or audio content © 1998-99 Valve L.L.C. All rights reserved.