Jump to content
fawlty

BIS_fnc_ambientFlyby info req'd

Recommended Posts

Guys is there a way to setvelocity [295,90,150];   (speed, direction, alt.) in conjunction with ambientFlyby.

The reason I ask is, if you use some 3rd party (cup) aircraft they will just drop out of the sky.

Using set velocity with hide show works but I'd like to use ambientFlyby.

 

Thanks

Share this post


Link to post
Share on other sites
0 = [] spawn {
   private _existingVehicles = vehicles select {_x isKindOf "air"};
   [<your parameters>] call BIS_fnc_ambientFlyby;
   private _createdVehArray =  ((vehicles select {_x isKindOf "air"}) - _existingVehicles);
   if (_createdVehArray isNotEqualTo []) then {
     private _createdVeh = _createdVehArray #0;
     _createdVeh setVelocityModelSpace [0,150,0];
   };
};

 

SetVelocity doesn't work like you write. The vector is [Vx,Vy,vz] in absolute reference frame (in m/s), like [x,y,z] coordinates are (in m).

Every time you want to pulse a plane or an object, use setVelocityModelSpace where [Vx,Vy,Vz] is relative to the vector direction/attitude of the object.

Here you just have to set [0,150,0] for an horizontal initial speed of 150 m/s (150 *3.6 km/h)

 

 

  • Like 1

Share this post


Link to post
Share on other sites

I used this in a trigger Pierre but I obviously don't know what I'm doing, got a error msg.

 

0 = [] spawn { 
   private _existingVehicles = vehicles select {_x isKindOf "air"}; 
   [LIB_FW190F8] call BIS_fnc_ambientFlyby; 
   private _createdVehArray =  ((vehicles select {_x isKindOf "air"}) - _existingVehicles); 
   if (_createdVehArray isNotEqualTo []) then { 
     private _createdVeh = _createdVehArray #0; 
     _createdVeh setVelocityModelSpace [0,150,0]; 
   }; 
};

 

Bf190 from the Iron Front mod

Share this post


Link to post
Share on other sites

No Go with this

 

 

0 = [] spawn {
   private _existingVehicles = vehicles select {_x isKindOf "air"};
   ["B_Plane_Fighter_01_F"] call BIS_fnc_ambientFlyby;
   private _createdVehArray =  ((vehicles select {_x isKindOf "air"}) - _existingVehicles);
   if (_createdVehArray isNotEqualTo []) then {
     private _createdVeh = _createdVehArray #0;
     _createdVeh setVelocityModelSpace [0,150,0];
   };
};

Share this post


Link to post
Share on other sites

this is what I'm using now in a trigger but only works for stock planes and heli's

 

[] spawn {[getMarkerpos "flyby2_1", getMarkerpos "flybybye2_1", 100,"FULL","vn_b_air_f4b_navy_mbmb"] call BIS_fnc_ambientflyby;  
sleep 2;   
[getMarkerpos "flyby2_1", getMarkerpos "flybybye2_1", 110,"FULL","vn_b_air_f4b_navy_mbmb"] call BIS_fnc_ambientflyby; sleep 15;  
[getMarkerpos "flyby2_1", getMarkerpos "flybybye2_1", 90,"FULL","vn_b_air_f4b_navy_mbmb"] call BIS_fnc_ambientflyby; sleep 2; 
[getMarkerpos "flyby2_1", getMarkerpos "flybybye2_1", 80,"FULL","vn_b_air_f4b_navy_mbmb"] call BIS_fnc_ambientflyby; 
};

Share this post


Link to post
Share on other sites
0 = [] spawn {
  private ["_existingVehicles","_createdVehArray","_createdVeh"];
  for "_i" from 0 to 3 do {
    private _existingVehicles = vehicles select {_x isKindOf "air"};
    [getMarkerpos "flyby2_1", getMarkerpos "flybybye2_1", 100,"FULL","vn_b_air_f4b_navy_mbmb"] call BIS_fnc_ambientflyby;
    private _createdVehArray =  ((vehicles select {_x isKindOf "air"}) - _existingVehicles);
    if (_createdVehArray isNotEqualTo []) then {
      private _createdVeh = _createdVehArray #0;
      _createdVeh setVelocityModelSpace [0,150,0];
      sleep ([2,15] select (_i == 1));
    };
  };
};

 

works also with "LIB_FW190F8" or any existing class of air.

  • Thanks 1

Share this post


Link to post
Share on other sites

That worked great Pierre, I've been trying to have something like this for a while. 

 

One more thing , if I want to change the flyby to 1 group of 2 or any changes like that do I adjust this    sleep ([2,15] select (_i == 1));     

 

 

Edit: It's OK I figured it out   for "_i" from 0 to 1 do

 

Thanks again

  • Like 1

Share this post


Link to post
Share on other sites

U can also make multiple patrols of 2 with something like:
From "i" from 1 to 40 ....
then
sleep ([0.5,15] select (_i mod 2 == 0));

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×