Jump to content
pappagoat

Getting aircraft name from BIS_fnc_ambientFlyBy?

Recommended Posts

Hello,

 

I'm using BIS_fnc_ambientFlyBy to spawn aircraft that fly a set route.
I am trying to find out how to get the unit name of the aircraft so that I can then do things to the spawned unit, such as limit its speed, set velocity and teleport AI into the aircraft.

 

Does anyone have any ideas?

Share this post


Link to post
Share on other sites

but that's not what Bis_fnc_flyby is for, you should use BIS_fnc_spawnVehicle instead

  • Like 1

Share this post


Link to post
Share on other sites
On 10/23/2019 at 4:09 AM, Mr H. said:

but that's not what Bis_fnc_flyby is for, you should use BIS_fnc_spawnVehicle instead

 

No, I know what it is and I wanted to use flyby. It''s for a repetitive AI paradrop.

Share this post


Link to post
Share on other sites

But why ? BIS_fnc_spawnVehicle returns the vehicle, can spawn it in the air and flying and gives you more control!

On 10/23/2019 at 8:47 AM, beno_83au said:

Use nearestObject with "Air" for the type to get the aircraft

will work but it's way messier and  more complicated to set up, plus it might detct the wrong aircraft if one is passing you by closer

Share this post


Link to post
Share on other sites

where do you use this function? In a trigger?, in a script?

At least you know the class and the position of what you spawn. So, as @beno_83au   wrote, a nearestObject [position, type] should work. you can even add a captive condition as this vehicle is captive.

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, Mr H. said:

will work but it's way messier and  more complicated to set up, plus it might detct the wrong aircraft if one is passing you by closer

 

No way, it's only 1 line, easy as. Plus, if you run this using the spawn position immediately after creating the aircraft it'll be fine.

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

×