// ------------------------------------------------------ Naming ------------------------------------------------------
Name Fighter-Bomber_A6M2 Zero
ShortName fighter-bomber_a6m2
ItemID 11212
Description MAX HP:150_FlareDelay 300_TimeFlareUsing 5s_PlaneAmmo BrowningM2 Ammo_PlaneBomb SmallBomb
// ------------------------------------------------------ Visuals ------------------------------------------------------
Icon Fighter-Bomber_A6M2
Model ww2.Zero
Texture Fighter-Bomber_A6M2
//Third Person Camera Distance
CameraDistance 7.5
//Resting Pitch. Set this so the plane spawns level. It will fall onto its collision boxes automatically, but this lets you start it flat
RestingPitch 5.0
// ------------------------------------------------------ Movement ------------------------------------------------------
//Mode : One of Plane, Heli or VTOL. The VTOL has a toggle button that switches some model aesthetics and the flight mode
Mode Plane
//Throttle
MaxThrottle 1.00
MaxNegativeThrottle 0.0
//Yaw modifiers
TurnLeftSpeed 0.8
TurnRightSpeed 0.8
//Pitch modifiers
LookUpSpeed 0.8
LookDownSpeed 0.8
//Roll modifiers
RollLeftSpeed 2.1
RollRightSpeed 2.1
//Drag 1.0 is standard. Modify to make the plane / heli more or less sluggish
Drag 0.45
//Wheels
NumWheels 3
WheelPosition 0 21 -22 -23
WheelPosition 1 21 -22 23
WheelPosition 2 -56 -8 0
WheelSpringStrength 0.125
//Propeller Positions
//Propeller <ID> <x> <y> <z> <planePart> <recipeItem>
Propeller 0 54 2 0 nose parts_metalpropeller
// ------------------------------------------------------ Weaponry ------------------------------------------------------
//Weapon types. Options are Missile, Bomb, Gun, Shell, None
Primary Shell
Secondary Bomb
//Time between shots in 1/20ths of seconds
PlaceTimePrimary 160
ShootDelayPrimary 2
ReloadTimePrimary 80
PlaceTimeSecondary 240
ShootDelaySecondary 240
ReloadTimeSecondary 240
BulletSpeed 7.00
BulletSpread 0.75
//Whether to alternate or fire all together
AlternatePrimary False
AlternateSecondary False
//Firing modes. One of SemiAuto, FullAuto or Minigun
ModePrimary FullAuto
ModeSecondary FullAuto
//Add shoot origins. These are the points on your vehicle from which bullets / missiles / shells / bombs appear
ShootPointPrimary 36 9 4 nose 
ShootPointPrimary 36 9 -4 nose 
ShootPointPrimary 28 -3 22 rightWing 
ShootPointPrimary 30 -3 22 rightWing 
ShootPointPrimary 28 -3 -22 leftWing 
ShootPointPrimary 30 -3 -22 leftWing 
ShootPointSecondary -4 -16 0 core 
ShootParticlesPrimary cloud 0 0 0
// ------------------------------------------------------ Inventory ------------------------------------------------------
CargoSlots 0
BombSlots 8
MissileSlots 6
AllowAllAmmo False
AddAmmo planeammo_browningm2ammo
AddAmmo planebomb_smallbomb
AddAmmo dummyammo
//Fuel Tank Size (1 point of fuel will keep one propeller going with throttle at 1 for 1 tick)
FuelTankSize 10000
// ------------------------------------------------------ Passengers ------------------------------------------------------
Pilot 12 -1 0
Passengers 0
// ------------------------------------------------------ Sounds ------------------------------------------------------
StartSound A6M2_StartSound
StartSoundLength 20
PropSound A6M2_PropSound2
PropSoundLength 40
StartSoundRange 100
EngineSoundRange 1000
PlaceSoundPrimary A6M2_PlaceSound
ShootSoundPrimary 12,7mm_2
ReloadSoundPrimary PG_reload
PlaceSoundSecondary None
ShootSoundSecondary Bombair
ReloadSoundSecondary PlaneBomb_reload1
LockedOnSound Lock
SoundTime 8
LockedOnSoundRange 15
// ------------------------------------------------------ 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 nose 1 parts_metalcockpit 9 iron 3 parts_smallwheel 1 parts_metalnose 1 parts_metalwingsmall 1 parts_bombbay
AddRecipeParts leftWing 1 parts_metalwingsmall
AddRecipeParts tail 1 parts_metaltail
//Dye colours are "black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "gray", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"
//AddDye 0 gray
// ------------------------------------------------------ Health and hitboxes ------------------------------------------------------
SetupPart core 150 -27 -7 -10 78 26 20
SetupPart leftWing 150 -7 -5 -88 32 2 176
SetupPart tail 100 -93 -7 -10 66 18 20
HasGear True
BulletDetection 5
//Collision points for breaking wings etc. upon crashing
//Core
CollisionPoint 20 2 0 core
CollisionPoint 40 2 0 core
//LeftWing
CollisionPoint 9 -3 80 leftWing
CollisionPoint 9 -3 60 leftWing
CollisionPoint 9 -3 40 leftWing
CollisionPoint 9 -3 20 leftWing
CollisionPoint 9 -3 -80 leftWing
CollisionPoint 9 -3 -60 leftWing
CollisionPoint 9 -3 -40 leftWing
CollisionPoint 9 -3 -20 leftWing
//Tail
CollisionPoint -60 2 0 tail
CollisionPoint -40 2 0 tail
CollisionPoint -80 2 0 tail
IsExplosionWhenDestroyed true
CollisionDamageEnable true
CollisionDamageThrottle 0.21
CollisionDamageTimes 0
HasFlare True
FlareDelay 300
FlareSound Flare
TimeFlareUsing 5