Skip to main content

Attachments

Attachments were added in version 2.6. They are extra model parts that follow a vehicle, each on its own armor stand. They can move on their own: wheels roll and steer, and turrets turn and fire. The default T50 tank uses a turret attachment for its cannon.
Vehicles that use the old complexadditions section are converted when they are loaded. The t50tankcannon addition becomes a turret. Other additions are skipped and a warning is shown in the console.

The attachments section

Add attachments in the attachments section of a vehicle file. Each key is the name of one attachment:
These options work for every attachment type: The keys pressed by the player in the controlling seat are sent to the attachment.

Wheel

A wheel rolls with the speed of the vehicle. Front wheels can also steer when the driver turns. A steering wheel is controlled by the driver seat unless you set another seat. The wheel goes back to the center when the driver stops turning.

Turret

A turret turns left and right when the player in its seat presses A and D, and it can fire from the end of its barrel. The fire values are the same inputs used by the InputManager: HONK, SIREN, MININUKE_BOMBER, TNT_BOMBER, 40MM_LAUNCHER and BULLETS_556. Use none to leave a key free.

Example: the T50 cannon

This is the cannon of the default T50. The gunner sits in passenger seat 0, and left-click fires a 40mm shell every 2 seconds:
When QualityArmory is installed, the 40MM_LAUNCHER uses the range, gravity, damage, explosion radius and knockback of QualityArmory’s m79 gun. The damage goes through QualityArmory, so armor and kill credit work like they do for its guns.

Custom attachment types

Other plugins can add their own attachment types. See the Developer API. A vehicle file can use a custom type before the plugin that adds it has loaded. The attachment is created when the type is registered.