Mando Bombs (mando_bombs.sqf)

By Mandoble

mando_bombs.sqf

A plane will perform real and accurate free fall or SADARM bombs run against indicated object or coordinates. The plane will drop two bombs in sequence.

If "SADARM" type is selected as bomb type, this script will require the presence of mando_bombs_sadarm.sqf and mando_bombs_effects.sqf.
 

Script parameter Description
Attacking plane plane that will perform the attack (you may use any plane type).
Target Object (vehicle, ship, soldier, building, gamelogic, etc) or coordinates
Radio true/false. If true, pilot will radio mission status messages.
Bomb position Relative position to the launcher in model coordinates. Second bomb will be spawed inverting the first element.
For example [2, 0, -2] will spawn first bomb 2m to the right of the plane and 2m below, second bomb 2m to the left of the plane and 2m below.
Altitude over target The flying altitude of the plane, between 100 and 300
Bomb class (optional) The class of a bomb type ammo or the special type "SADARM". "Bo_GBU12_LGB" is used by default if this parameter is not provided.

Examples:


scr = [plane1, target1, true, [2, 0, -2],100]execVM"mando_bombs\mando_bombs.sqf";

 

scr = [plane1, getMarkerPos "mk_objetive", true, [2, 0, -2], 150, "SADARM"]execVM"mando_bombs\mando_bombs.sqf";

To check whether an attack run has finished, use

if (scriptDone _scr) then {// attack finished};


This script updates also "mando_airsupport_state" internal vehicle variable with the following possible states:

  •          "Ingressing"; Ingressing for bomb run.
  •          "Egressing"; Egressing from bomb run.
  •          "Destroyed"; Plane destroyed.
  •          "Enganging": Attacking position.
  •          "Enganging target": Attacking object.
  •          "SADARMs away": SADARMs have been dropped over target.
  •          "Bombs away": Free fall bombs have been dropped over target.
  •          "No visual": The attacker cannot see the target.
  •          "Failed to align": The attacker failed to aling in time with the target.

You may use getVariable command to check the current value.