Skip to main content

scripted_tanksequence

scripted_tanksequence icon
Point entityPorted from FeaturefulSpirit of Half-Life

A scripted_tanksequence takes over a func_tank for a moment, so the gun turns and fires without a player at its controls.

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Tank to affectm_iszEntity

Names the func_tank.

Turn tom_iTurn

Sets where the gun turns.

  • Don't turn (0) - The gun doesn't turn
  • Match sequence angle (1) - The gun turns to this entity's angles
  • Face sequence (2) - The gun aims at this entity
  • Face enemy (3) - The gun aims at the enemy, and if no enemy is found, the sequence doesn't start

If you leave this key empty, it is "Don't turn".

Default Face sequence (2)
Enemy to facem_iszEnemy

Names the enemy, as a name, !activator or a class name. A class name gives the nearest entity of that class within the gun's range, but never a spectator.

If you leave this key empty, the enemy is the target the gun would pick by itself.

Fire gunm_iShoot

Sets when the gun fires during the sequence.

  • Don't fire (0)
  • Once (at end) (1)
  • Constantly (2)
  • While facing target (3)

If you leave this key empty, it is "Don't fire".

Default Once (at end) (1)
Halt conditionm_iUntil

Sets what ends the sequence by itself and fires Trigger on halt. With "None", only a trigger or the Time limit ends it.

  • None (0)
  • Tank faces target (1)
  • Enemy dies (2)

If you leave this key empty, it is "None".

Default Tank faces target (1)
Trigger on halttarget

Fires this target when the Halt condition happens.

Time limitm_fDuration

Sets how many seconds the sequence can run, and 0 means no limit. When the time runs out, the sequence ends and fires Trigger on timeout.

Default 0
Trigger on timeoutnetname

Fires this target when the Time limit runs out.

Tank state afterwardsm_iActive

Sets whether the gun is switched on, switched off or switched to the other state when the sequence ends.

  • No change (0)
  • Active (1)
  • Inactive (2)
  • Toggle (3)
Default No change (0)
Control afterwardsm_iControllable

Sets whether players can take the gun's controls after the sequence. It sets, clears or switches the gun's flag Controllable.

  • No change (0)
  • Controllable (1)
  • Not Controllable (2)
  • Toggle (3)
Default No change (0)

Flags​

1Dump player

A player at the gun's controls is pushed off. Without this flag, a trigger does nothing while a player is using the gun, so the sequence doesn't start

2Repeatable

You can use the entity again. Without this flag, it removes itself after one run

Notes​

  • A player can't take the controls during a sequence
  • A trigger with the use type Toggle or Off ends a running sequence early, and it doesn't fire Trigger on halt

See also​

Changes since 1.38​

  • scripted_tanksequence is new