Jump to content
initramfs

Correct use of airportSide and setAirportSide

Recommended Posts

As part of a general vehicle operations script I have fixed winged aircraft land in aerodromes based on conditional code. One particular aspect regarding the choice of aerodrome to land at depends on the controlling faction of said aerodrome. To assert landing at the correct aerodrome I was attempting to use the airportSide script command to determine the side of a given aerodrome based on a previously assigned side with setAirportSide.

However, no matter what combination or order of calls to airportSide and setAirportSide (whether dynamically attempting to change airport sides or via static assignment in init scripts), airportSide always returns nil. The only case where I could get a non-nil result back from airportSide is when I use the object-overload of airportSide with a carrier, i.e.:

_carrierSide = airportSide aircraftCarrierObject

where aircraftCarrierObject is the variable name for an aircraft carrier scenario object placed in via the editor.

To clarify, the usage of airportSide or setAirportSide with numerical aerodrome IDs seem to do absolutely nothing (which is inconsistent with the calling parameters of landAt, which works with aerodrome IDs). To give an example:
 

0 setAirportSide east;
_aerodromeSide = airportSide 0;

isNil "_aerodromeSide"; // Returns true

Am I using the script command incorrectly in any way? Can anyone advise on what I am doing wrong?

EDIT:
To further clarify, I am attempting to get the Number/ID variant of airportSide/setAirportSide to work. I've already had success with the object-based overloads of those scripting commands, the only caveat being I do not know a way of deriving an "Object" out of Location entries on a map.

The script command has been tested on Stratis, Altis and Tanoa with the same non-functional result.

Edited by initramfs
Specified maps used for testing

Share this post


Link to post
Share on other sites

I never used it but which map are u using? Maybe a custom map could not have the proper configuration for its airports?

Share this post


Link to post
Share on other sites
Just now, fn_Quiksilver said:

not working?

 

https://community.bistudio.com/wiki/setAirportSide


target setAirportSide side        Since Arma 3 v1.68

 


In the documentation, target is defined as having a type of object. Unless I am missing something, aerodromes/airports aren't objects but Locations on a scenario. Perhaps it was not made clear but I had success with using target setAirportSide side with an aircraft carrier given that the carrier is an eden entity.

Then variant of the command I've been trying to get work is "id setAirportSide side" which takes the aerodrome ID.

Share this post


Link to post
Share on other sites
3 minutes ago, sarogahtyp said:

I never used it but which map are u using? Maybe a custom map could not have the proper configuration for its airports?


Tried on Altis and Stratis to no avail. I can try on Tanoa now, though I would hope that it can work across all BI-made maps.

Share this post


Link to post
Share on other sites
_target = (nearestObjects [my_carrier ,["DynamicAirport_01_F"],1000]) select 0;
_target setAirportSide 1;
_side =  airportSide _target;

@killzone_kid might be good to put an example like this into the wiki page for setAirportSide alt syntax, documentation on DynamicAirport_01_F is scarce

Share this post


Link to post
Share on other sites
3 minutes ago, fn_Quiksilver said:

_target = nearestObjects [my_carrier ,["DynamicAirport_01_F"],1000];
_target setAirportSide 1;

 


As previously mentioned, I have no problems setting "airport side" for aircraft carriers. What I am interested in is setting airport side for static airports (e.g. Aeroport de Tanoa, Bala Airstrip, etc) which as far as I know are only referenced by a unique numerical ID per map. Unless there is a way to somehow derive an object out of a static aerodrome, I'm primarily concerned with how the numerical overload of the airportSide/setAirportSide script commands work.

Share this post


Link to post
Share on other sites
3 hours ago, fn_Quiksilver said:

_target = (nearestObjects [my_carrier ,["DynamicAirport_01_F"],1000]) select 0;
_target setAirportSide 1;
_side =  airportSide _target;

@killzone_kid might be good to put an example like this into the wiki page for setAirportSide alt syntax, documentation on DynamicAirport_01_F is scarce

 

airportSide command seems to be semi-broken. Let's see what Santa's elves of BI are up to. 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, killzone_kid said:

airportSide should be fixed in next dev and should support airport id

 

what was the issue?

Share this post


Link to post
Share on other sites
17 minutes ago, fn_Quiksilver said:

 

what was the issue?


You don't want to know :)

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

×