Please add a new Event Handler that triggers when a vehicle breaks the sound barrier (specifically when soundSetSonicBoom[]={}; from CfgVehicles hits).
I want to spawn the vanilla shock cone model "\a3\data_f_jets\particleeffects\shockcone.p3d" exactly when the plane goes supersonic and not use each frame or looping. This will also be useful for other purposes.
Usage examples:
_plane addEventHandler ["SonicBoom", { params ["_vehicle", "_isSupersonic"]; }];
_plane addEventHandler
[
"SonicBoom",
{
params ["_vehicle", "_isSupersonic"]
if (_isSupersonic) then
{
private _cone = createSimpleObject ["\a3\data_f_jets\particleeffects\shockcone.p3d", getPosASL _vehicle]
_cone attachTo [_vehicle, [0, -4, 0]]
_cone setVectorDirAndUp [[0, -1, 0], [0, 0, 1]]
[_cone] spawn
{
sleep 1
deleteVehicle _this
}
}
}
]