//----------------------------Naming
Name GMC Truck T27 Xylophone
ShortName 44_GMCTruckT27Xylophone

//----------------------------Visuals
RotateWheels True
Icon 44_GMCTruckT27Xylophone
Model W44.GMCTruckT27Xylophone
Texture Skin44_GMCTruckT27Xylophone

//----------------------------Third Person Camera Distance
CameraDistance 7.5

//----------------------------Throttle
MaxThrottle 0.8
MaxNegativeThrottle 0.5


//----------------------------Steering modifiers
TurnLeftSpeed 0.5
TurnRightSpeed 0.5

//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 -32 -8 -18
WheelPosition 1 -32 -8 18
WheelPosition 2 32 -8 18
WheelPosition 3 32 -8 -18
WheelSpringStrength 0.5

//Bouncy bouncy
Bounciness 0.3

//If true, then all wheels will apply drive forces
//----------------------------Tank mode activate
Tank false
FourWheelDrive true

//----------------------------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 8
AllowAllAmmo false

//----------------------------Driver and passenger positions
Driver 23 13 -7 -360 360 -89 89
RotatedDriverOffset 0 0 0
Passengers 0
//Passenger 1 29 13 10 core -10 10 -10 10 44_30Cal PassengerGun1
//GunOrigin 1 35 -5 9
// X + 5 , -Y -20 
//----------------------------Ammo
AddAmmo 44_UnguidedRocket
AllowAllAmmo False
//Secondary gun
//AddGun 20 33 -5 turret 44_30Cal
ShootDelay 3
ShellDelay 7

//----------------------------Sounds
StartSound JeepIdle
StartSoundLength 7
EngineSound Engine_LT_Truck
EngineSoundLength 39
ShootSoundPrimary RocketShoot
ShootSoundSecondary None
SoundsPlaceTimePrimary 60
BackSound Engine_LT_Truck
StartSoundRange 12
EngineSoundRange 30
BackSoundLength 39
BackSoundRange 25
PlaceSoundPrimary TankPlace
//----------------------------Recipe
//The sections are tailWheel, tail, bay, topWing, leftWingWheel, leftWing, rightWingWheel,
//rightWing, nose, turret, coreWheel, core
AddRecipeParts core 1 44_Car_Chassis 4 44_Vehicle_Seat 16 44_Metal_Tube
AddRecipeParts frontLeftWheel 1 44_Car_Wheel
AddRecipeParts frontRightWheel 1 44_Car_Wheel
AddRecipeParts backLeftWheel 2 44_Car_Wheel
AddRecipeParts backRightWheel 2 44_Car_Wheel
//Dye colours are "black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "gray", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"
AddDye 5 green

//Health and collision
SetupPart core 300 -66 4 -18 132 32 36
SetupPart frontRightWheel 75 43 -10 -19 19 19 6
SetupPart frontLeftWheel 75 43 -10 13 19 19 6
SetupPart backRightWheel 75 -55 -10 -20 42 19 11
SetupPart backLeftWheel 75 -55 -10 9 42 19 11


BulletDetection 5

//Size Multiplier; scales up the model
ModelScale 1
Description American Truck - mounted rocket launcher__Uses : Unguided Rocket__Year Introduced : 1944
BulletDetection 5

//----------------------------Barrel

ShootParticlesPrimary largeexplode 0 0 0
ShootParticlesPrimary explode 0 0 0
ShootParticlesPrimary cloud 0 0 0
ShootParticlesPrimary flansmod.fmflame 0 0 0

ShootParticlesSecondary crit 0.5 0 0

//Whether to alternate or fire all together
AlternatePrimary True
AlternateSecondary False
//Firing modes. One of SemiAuto, FullAuto or Minigun
ModePrimary FullAuto
ModeSecondary FullAuto

Primary Shell

ShootPointPrimary 3 36 26 core
ShootPointPrimary -3 36 26 core
ShootPointPrimary -9 36 26 core
ShootPointPrimary -15 36 26 core


ShootPointPrimary -35 36 26 core
ShootPointPrimary -41 36 26 core
ShootPointPrimary -47 36 26 core
ShootPointPrimary -53 36 26 core

CanRoll true


//----------------------------Smoke effects

//----------------------------Damage
AddEmitter smoke 2 [-34,26,-23.25] [7,1,7] [0,0.5,0] -1 1 0 0.75 core
AddEmitter smoke 2 [-34,26,23.25] [7,1,7] [0,0.5,0] -1 1 0 0.75 core
AddEmitter smoke 2 [5,43,14] [3,1,3] [0,0.5,0] -1 1 0 0.75 turret

AddEmitter largesmoke 3 [-34,26,-23.25] [7,1,7] [0,1,0] -1 1 0 0.5 core
AddEmitter largesmoke 3 [-34,26,23.25] [7,1,7] [0,1,0] -1 1 0 0.5 core
AddEmitter largesmoke 2 [5,43,14] [3,1,3] [0,0.5,0] -1 1 0 0.5 turret

AddEmitter largesmoke 1 [-34,26,-23.25] [7,1,7] [0,1.5,0] -1 1 0 0.25 core
AddEmitter largesmoke 1 [-34,26,23.25] [7,1,7] [0,1.5,0] -1 1 0 0.25 core

AddEmitter flame 1 [-34,26,-23.25] [5,1,5] [0,1,0] -1 1 0 0.25 core
AddEmitter flame 1 [-34,26,23.25] [5,1,5] [0,1,0] -1 1 0 0.25 core
AddEmitter largesmoke 1 [5,43,14] [3,1,3] [0,1,0] -1 1 0 0.5 turret


//----------------------------Turret rotation stuff
DriverAimSpeed 0.6 0.5 0

DriverYawBeforePitch false

DriverTraverseSounds false

YawSound TurretTraverse1
YawSoundLength 21

PitchSound TurretTraverse2
PitchSoundLength 20


BulletDetection 5

CanRoll false

//1st gear

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

//2nd gear

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

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

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

//4th gear change

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

IsExplosionWhenDestroyed true

BulletSpeed 5
BulletSpread 4

//Extras

FixedPrimary True
PrimaryAngle 0 0.25 -0.90
SquashMobs True