func_tank (func_tankrocket, func_tankmortar, func_tanklaser)
Spawnflags
SF_TANK_LINEOFSIGHT | 16 (this flag is present in the original SDK but not documented anywhere; the tank shoots only if the enemy is directly visible) |
SF_TANK_CANCONTROL | 32 (unlike the original implementation, here this flag prevents the machine gun from working in automatic mode) |
SF_TANK_MATCHTARGET | 128 (in manual control mode, the tank's main gun aims where the player is looking; good for controlling multiple guns) |
Options
firemaster | Master that blocks shooting but allows control and aiming. Can be used for simulating depleted ammunition. |
firetarget | Target that the tank fires at in automatic mode. Accepts a classname or a targetname. |
m_iClass | Class of the tank—really an NPC class. For more details about classes, see Monster Classes and Behaviour. |
Usage Details
- If firetarget and m_iClass are not used, the func_tank fires only at the player.
- Note that the IN USE state is achieved whenever the tank attempts to fire, whether or not shooting is blocked by a master. This state can be set both manually and automatically.