scripted_tanksequence

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:
- Naming and triggering: Name
- Position: Pitch Yaw Roll
m_iszEntityNames the func_tank.
m_iTurnSets 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".
Face sequence (2)m_iszEnemyNames 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.
m_iShootSets 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".
Once (at end) (1)m_iUntilSets 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".
Tank faces target (1)targetFires this target when the Halt condition happens.
m_fDurationSets 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.
0netnameFires this target when the Time limit runs out.
m_iActiveSets 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)
No change (0)m_iControllableSets 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)
No change (0)Flags
1Dump playerA 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
2RepeatableYou 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
func_tank- the gun turretfunc_tankcontrols- the controls players usemonster_target- a target that monsters and guns attack
Changes since 1.38
scripted_tanksequenceis new

