// ------------------------------------------------------ Naming ------------------------------------------------------
Name Fighter-Bomber_BF109
ShortName fighter-bomber_bf109
ItemID 11210
Description MAX HP:150_FlareDelay 300_TimeFlareUsing 5s_PlaneAmmo BrowningM2 Ammo_PlaneBomb SmallBomb
// ------------------------------------------------------ Visuals ------------------------------------------------------
Icon Fighter-Bomber_BF109
Model ww2.BF109
Texture Fighter-Bomber_BF109
//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 3 -21 -24
WheelPosition 1 3 -21 24
WheelPosition 2 -82 -9 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 50 8 5 nose 
ShootPointPrimary 50 8 -5 nose 
ShootPointPrimary 26 -4 28 rightWing 
ShootPointPrimary 26 -4 36 rightWing 
ShootPointPrimary 26 -4 -28 leftWing 
ShootPointPrimary 26 -4 -36 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 -4 -1 0
Passengers 0
// ------------------------------------------------------ Sounds ------------------------------------------------------
StartSound BF109_StartSound
StartSoundLength 20
PropSound BF109_PropSound
PropSoundLength 40
StartSoundRange 100
EngineSoundRange 1000
PlaceSoundPrimary BF109_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