Flamethrower

Classname: flamethrower
Purpose: Incineration
code: g_flamethrower.c
To make a flamethrower you need to have a flamethrower entity tied to two brushes, one a `trigger' brush (a brush without the origin texture), the an `origin' brush (one with the origin texture). The trigger brush sets off the jet when the player walks into it, and also sets the player on fire. The origin brush determines where the jet originates from (an origin field will also work). The player will ignite after touching the trigger, regardless of where the jet goes, so you have to be a bit careful to avoid stupid-looking results.

You can aim the jet in the horizontal plane using an angle field, or in three dimensions using angles (but -1 and -2 for angle do not work). Three dimensional aiming is a bit tricky, the angle-field is a triple of numbers saying how the jet is to be rotated around the Y, Z and X axes in succession (a `mangle'). To aim the jet straight down for example set angles to 90 0 0.

You can control the length of the jet with the speed field, and the damage it does with the dmg. It can also be targetted, so that it turns on either when the player walks into its regular `trigger' brush, or by another trigger. Finally there's a wait field. A wait-value of -1 makes it work in toggle-mode, turning on when triggered and off when triggered again, but only by targetting, not the player touching its regular trigger-brush. This effect is not however quite as good as it might be, since the full sound effect is looped, producing a pulsing effect rather than a continuous whoosh. Otherwise the wait-value determines the time till the jet will refire, but has no effect on the trigger-brush igniting the player, so again some care has to be used to avoid stupid-looking results (in the Raven maps, -1 and .5 are the wait-values that occur).

Fields

targetname value is a name, targetted by an entity that turns the flamethrower on.
angle value is a number, default 0, angle of jet in horizontal plane. -1, -2 don't work for up and down.
angles value is a triple of numbers, rotates jet around Y Z X axes in succession (90 0 0 for straight down). An angle-value will override this.
speed value is a number, default 400, determining length of jet
wait Value is a number, -1 makes it work in toggle mode, being turned on and off by a trigger, other values determine time before jet can fire again (but player still ignites when touching the trigger brush).
dmg value is a number, damage per .1 sec, default = 2. Doesn't seem to have any effect if spawnflag 1 (STEAM) is checked.
spawnflags
  • 1 - STEAM: Jet is steam rather than fire. Seems instantly fatal, while fire can be put out by rolling.
  • 2 - MONSTERTOUCH: Monsters set it off too.
Return to the Tutorials.