cdn_limey 3 Posted April 11, 2017 Hello Arma coommunity. Was wondering if anyone knew of a script that would spawn 2 planes flying in formation from a marker placed on the map, to fly to another marker and then delete both the planes and the crew, then repeat the process every 10 minutes. I`am putting together a mission and need a sort of continuous air flyby every 10 mins or so to buzz the area. Thanks in advance Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted April 11, 2017 Check out BIS_fnc_ambientFlyby. Cheers 2 Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 11, 2017 9 minutes ago, cdn_limey said: Hello Arma coommunity. Was wondering if anyone knew of a script that would spawn 2 planes flying in formation from a marker placed on the map, to fly to another marker and then delete both the planes and the crew, then repeat the process every 10 minutes. I`am putting together a mission and need a sort of continuous air flyby every 10 mins or so to buzz the area. Thanks in advance That's pretty easy, spawn a pilot then a plane in "FLY" state at the marker and move the pilot into it. Then give it the command move so it would fly to the next marker then on arrival kill the pilots and delete them as well as the plane. Easy Share this post Link to post Share on other sites
cdn_limey 3 Posted April 11, 2017 and how would you repeat that every 10 mins Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 11, 2017 Just now, cdn_limey said: and how would you repeat that every 10 mins put the script in a while{true} loop with a sleep 600 at the end. Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 11, 2017 Lemme know when you get it to work if you are still stuck lemme know Share this post Link to post Share on other sites
cdn_limey 3 Posted April 11, 2017 41 minutes ago, Grumpy Old Man said: Check out BIS_fnc_ambientFlyby. Cheers Works perfect thanks man Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 11, 2017 42 minutes ago, Grumpy Old Man said: Check out BIS_fnc_ambientFlyby. Cheers Look at that, there is already a ready made function. Well gotta finish my mission file quick so I can start studying the rest. 1 Share this post Link to post Share on other sites
cdn_limey 3 Posted April 11, 2017 Ok i have this in a game logic and works great, but how would i add the 600 loop to it for it to be continuous. [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 11, 2017 2 minutes ago, cdn_limey said: Ok i have this in a game logic and works great, but how would i add the 600 loop to it for it to be continuous. [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; 3 while {true}{ [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; sleep 600; }; Share this post Link to post Share on other sites
cdn_limey 3 Posted April 11, 2017 Just put that into the game logic and it throws an error missing ; Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted April 11, 2017 BK was missing a "do": while {true} do { [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; sleep 600; }; Out of good practice it's best to have full control over the loop: TAG_flyBy = true; TAG_flyByPause = false; while {TAG_flyBy} do { waitUntil {!TAG_flyByPause}; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; sleep 600; }; This way you can pause planes from spawning when setting TAG_flyByPause to true, and completely exit the loop setting TAG_flyBy to false. Cheers 2 Share this post Link to post Share on other sites
BlacKnightBK 47 Posted April 12, 2017 11 hours ago, Grumpy Old Man said: BK was missing a "do": while {true} do { [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; sleep 600; }; Out of good practice it's best to have full control over the loop: TAG_flyBy = true; TAG_flyByPause = false; while {TAG_flyBy} do { waitUntil {!TAG_flyByPause}; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; sleep 600; }; This way you can pause planes from spawning when setting TAG_flyByPause to true, and completely exit the loop setting TAG_flyBy to false. Cheers ooooh for fucks sake. Cant i ever do something right? Thanks Grumpy, again 1 Share this post Link to post Share on other sites
cdn_limey 3 Posted April 12, 2017 Just tried both ways, and it comes up with a generic error message and freezes the game [#] sleep 600; }; As you can most proberly tell i am no good at this kind of thing 1 Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted April 19, 2017 How did you execute it? You'd need to spawn it: TAG_flyBy = true; TAG_flyByPause = false; GOM_fnc_ambientAirLoop = { while {TAG_flyBy} do { waitUntil {!TAG_flyByPause}; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; [[1585.55,7832.58,-185.97],[21257,20780,-37.453],140,"NORMAL","B_Plane_CAS_01_F",WEST] call BIS_fnc_ambientFlyby; _sleep = time + 600; waitUntil {time > _sleep OR !TAG_flyByPause OR !TAG_flyBy}; }; }; _loop = [] spawn GOM_fnc_ambientAirLoop Cheers Share this post Link to post Share on other sites
cdn_limey 3 Posted April 30, 2017 I got this to work now thanks guys, was something i did my end that messed it up Share this post Link to post Share on other sites