I only see a couple of soke puffs/hear a couple of 'tunk' sounds to indicate some sort of impact.
The other ammo originally used doesn't do anything.
But, I had to use the
_heli = _this select 0; part instead of the
_heli = vehicle player;, because if I used the latter there were no bullets fired at all.
But still no errors.
I really don't know what "mala vrtule" means
The models in the game can have many so called 'named selections', parts of the model are specially named so that the game knows what do with them.
"mala vrtule" is the tail rotor selection.
Which leads me to this, don't use modelToWorld alone, use
selectionPosition as well.
This way you get the bullets to impact the desired selection without any "trial 'n' error".
So, replace this both _pos lines with:
_pos1 = _heli modelToWorld (_heli selectionPosition "mala vrtule");
_pos2 = _heli modelToWorld (_heli selectionPosition "mala vrtule");
EDIT:
Oh, and of course the
pg7v doesn't show up because it's the weapons magazine class, you need to use the ammo class to create the rocket. In this case it's
R_PG7V_AT. But that blows the chopper to pieces so something less powerfull is needed..
EDIT2:
Ok, changed your code a bit:
_heli = _this;
_rotordead = false;
_HEid = _heli addEventHandler ["dammaged",
{
if ((_this select 1)=="mala vrtule" && (_this select 2)>0.8) then
{
_rotordead=true;
hint format ["s0: %1\ns1: %2\ns2: %3",_this select 0,_this select 1,_this select 2];
};
}];
sleep 0.5;
_spd = 1100;
while {!_rotordead}
do {
_pos1 = _heli modelToWorld (_heli selectionPosition "mala vrtule");
_pos2 = _heli modelToWorld (_heli selectionPosition "mala vrtule");
_vx = (_pos2 select 0) - (_pos1 select 0);
_vy = (_pos2 select 1) - (_pos1 select 1);
_vz = (_pos2 select 2) - (_pos1 select 2);
_bullet = "B_127x99_Ball_noTracer" createvehicle _pos1;
_bullet setpos _pos1;
_cvel = velocity _heli;
_fact = 50;
_bullet setvelocity [(_cvel select 0) + _vx * _fact,(_cvel select 1) + _vy * _fact,(_cvel select 2) + _vz * _fact];
sleep 0.1;
};
_heli removeEventHandler ["dammaged",_HEid];
execute with
heloname execVM "script.sqf"
But using those bullets it takes up to the doomsday before the chopper gets any damage..