+==================+
| BD Hellfire v1.1 |
+==================+

Author:
======
Big Dawg KS

Credits:
-------
Big Dawg KS - scripts
oyman - testing

Changelog:
=========
v1.0
-----
Initial Release

v1.1
-----
-Improved top attack simulation
-Improved compatability with other addons
--Limited support for different weapon classnames
--Top attack parameters can be set in missile config

Description:
===========
BD Hellfire is an enhancement that provides an alternative (hopefully more realistic) system for engaging targets with the
AGM-114 Hellfire Air to Ground Missile system. The system forces players to use laser designation to guide Hellfires,
without interfering with AI controlled aircraft's ability to engage targets with Hellfires.

Currently, the system will be utilized on the AH-64, AH-1, and MQ-9 aircraft in game.

Firing Hellfires:
----------------
Players can no longer fire hellfires at will with when using BD Hellfire. They will not be able to select Hellfires
from their weapons. Instead, when a valid target is available, the ability to fire using an action (or shortcut key)
will be enabled. The action, called "Fire Hellfire", will appear when you have a lock on a laser target. A shortcut
key can be used to invoke firing without using the action menu. By default, it is your "reload" key.

Under normal circumstances, this action will be available to the aircraft's gunner. If Manual Fire is on however, it
will be available to the pilot instead.

Targetting:
----------
There are several ways to lock on to a target, but you can only lock on laser targets. The simplest way to designate
a target is to turn your own aircraft's laser designator on (which will be added to the aircraft if it is using
BD Hellfire). While your aircraft's laser deisgnator is on, you will be locked on to the target it creates by default.
This is sufficient enough to fire a missile, which will track your aircraft's laser.

In addition, you can simply point your crosshairs toward a laser from another source (ground unit or other aircraft),
and you may be able to get a lock. This is a less reliable method, and may not always produce a lock. If you are able
to get a lock with this method, you the fire action will be available.

Lastly, using your laser designator you can manually lock on any laser target. If you have a hard lock on a target,
this target will be used to guide your missiles. Even if you have your own laser active, locking on to another
source will override your laser.

Hellfire Flight Modes:
---------------------
BD Hellfire also includes the option to enable a top attack flight path when firing Hellfires. You can switch between
top attack and direct (default ArmA 2 behavior) attack using the "Toggle Direct/Top Attack" action. In top attack
mode, the hellfire will begin to climb right after it is launched. When it finishes climbing, it will turn back on
the target and engage it from a high angle. Using top attack will allow you to engage targets from behind obsitcles,
as well as hit hard targets such as tanks and APCs on the top where their armor is weaker. The default shortcut for
the toggle action is your "vehicle turbo" key.

Under normal circumstances, this action will be available to the aircraft's gunner. If Manual Fire is on however, it
will be available to the pilot instead.

Addons:
------
As of v1.1, you can enable BD Hellfire on other vehicles by calling the following script on it:

[this] execVM "\BD_Hellfire\initEH.sqf"

If the vehicle uses different weapon classnames, you must set the following variable on the
vehicle (using setVariable) to that classname (only 1 weapon supported per vehicle):

BD_HF_HellfireWeapon

ex:
this setVariable ["BD_HF_HellfireWeapon","Addon_HellfireLauncher"]

Also in v1.1, addons can be made more combatable with the top attack feature by defining some config parameters.
If no parameters are present, default values are used (based on BIS hellfire flight characteristics). These
parameters are added to the CfgAmmo class for the missile:

/* This determines the maximum climb angle. Depending on other config values, the missile may not be capable
   of tracking its target at steeper angles. If it loses the target, it cannot reacquire it, so set the
   climb angle to something that doesn't point the nose of the missile at too much of an angle from the target. */
BD_climbAngle = <number>;	// between 0 (flat) and 90 (straight up) degrees

/* This determines the maximum altitude the missile will climb before diving back down. */
BD_climbMaxAlt = <number>;	// measured in meters relative to launch altitude

/* This determines how the missile adjusts its climb altitude for closer targets. It is defined as the percentage
   of the distance to the target at time of launch that the missile will stop climbing. For example, if the target
   is 300m away at launch, a value of 0.3 means the missile will stop climbing after travelling 90m (horizontally)
   even if it has not yet reached its maximum altitude. If it reaches its maximum altitude first, it will stop
   climbing at that point. */
BD_climbTargetDistanceMultiplier = <number>;	// decimal value between 0 and 1 (usually betwen 0.1 and 0.5)


Multiplayer:
===========
Requires the addon to be installed on the server to work. Only clients that have it installed will be able to use it.

Expansions:
===========
Requires Operation Arrowhead. Also compatable with Combined Operations (ArmA 2 + OA).

Required Addons:
===============
THIS ADDON REQUIRES EXTENDED EVENTHANDLERS
This addon should also be compatable with any other addons provided they don't interfere with the XEH stuff.

Disclaimer:
==========
I am not responsible for ANYTHING that happens to your computer by using this addon. Use at your own risk.

Installation:
============
Install the pbo & bisign files into the Addons folder in your ArmA 2/OA directory or any mod directory. Install the
bikey file in your Keys directory.
