//Naming
Name M3 Halftrack
ShortName M3Halftrack
ItemID 23400
//Visuals
Icon M3Halftrack
Model ww2.M3Halftrack
Texture SkinM3Halftrack
RotateWheels true
//Third Person Camera Distance
CameraDistance 7.5
//Throttle
MaxThrottle 0.4
MaxNegativeThrottle 0.25
//Steering modifiers
TurnLeftSpeed 0.45
TurnRightSpeed 0.45
//For calculating whether wheels are on the ground or not for driving
WheelRadius 1.0
//Wheel positions for collision handling. Tanks still have 4 wheels, they are just the corner ones.
WheelPosition 0 -46 -10 -14
WheelPosition 1 -46 -10 14
WheelPosition 2 40 -10 14
WheelPosition 3 40 -10 -14
WheelSpringStrength 0.5
//Bouncy bouncy
Bounciness 0.3
//If true, then all wheels will apply drive forces
FourWheelDrive true
//Tank mode activate
Tank false
//Fuel Tank Size (1 point of fuel will keep one propeller going with throttle at 1 for 1 tick)
FuelTankSize 2000
//Inventory Slots
CargoSlots 20
ShellSlots 0
//Driver and passenger positions
Driver 6 5 -7 -360 360 -89 89
RotatedDriverOffset 0 0 0
Passengers 5
Passenger 1 6 5 7 core
Passenger 2 -37 10 12 core
Passenger 3 -23 10 -12 core
Passenger 4 -7 28 8 core -55 55 -10 45 50Cal PassengerGun4
Passenger 5 -49 18 -7 core 140 220 -10 45 browning PassengerGun5
GunOrigin 4 5 19 8
GunOrigin 5 -54 13 -7
RotatedPassengerOffset 0 0 0 0
BarrelPosition 0 0 0
//Secondary gun
AllowAllAmmo False
AddAmmo none
//Delays are in ticks or 1/20ths of seconds
ShootDelay 1
ShellDelay 100
//Sounds
StartSound TankIdle
StartSoundLength 20
EngineSound TankMove
EngineSoundLength 60
ShootSoundPrimary Tank3Shoot
ShootSoundSecondary MG42Shoot
//Recipe
//Each section of the plane may have many parts
//The sections are tailWheel, tail, bay, topWing, leftWingWheel, leftWing, rightWingWheel,
//rightWing, nose, turret, coreWheel, core
AddRecipeParts turret 1 tankTurret 1 vehicleSeat
AddRecipeParts core 1 tankBody 1 vehicleSeat
AddRecipeParts leftTrack 1 catTrack
AddRecipeParts rightTrack 1 catTrack
//Dye colours are "black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "gray", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"
AddDye 10 gray
//Health and collision
SetupPart core 100 -63 -10 -20 113 40 40
BulletDetection 7
ModelScale 1.1
PassengerLegacyAiming 4 true
PassengerLegacyAiming 5 true

//Turret traverse speeds, yaw/pitch/z (z is unused, set to 0)
DriverAimSpeed 3.0f 3.0f 0f

//Set to true to adjust turret yaw before pitch
DriverYawBeforePitch false

//Turret traverse sounds

//Enables traverse sounds for driver turret
DriverTraverseSounds false

PitchSound TurretTraverse1
PitchSoundLength 61

YawSound TurretTraverse2
YawSoundLength 38




//1st gear

AddEmitter explode 1 [-58,-2,0] [1,1,1] [0,0.2,0] 0.05 0.2 0 1 core

//2nd gear

AddEmitter explode 1 [-58,-2,0] [1,1,1] [0,0.7,0] 0.2 0.5 0 1 core

//3rd gear
AddEmitter explode 1 [-58,-2,0] [1,1,1] [0,0.7,0] 0.5 2 0 1 core

AddEmitter largesmoke 3 [-58,-2,0] [1,1,1] [0,0.5,0] 0.8 2 0 1 core

//4th gear change

AddEmitter largesmoke 1 [-58,-2,0] [1,1,1] [0,5,0] 0.7 0.75 0 1 core