Jump to content
Sign in to follow this  
Jnr4817

Looking for ambient plane script

Recommended Posts

I am looking for an ambient plane script. One that will allow any plane to take off, land, and taxi from any airport on the map. For example, on Atlis this script would spawn a set amount of planes, say 5-25, which would all taxi and take off, landing at a random airport and repeating. I would like thier collision lights and search lights on if available and the ability to set height and speed. BIS has an ambient plane fnc. Bis_fnc_ambientplane.fsm, but I cannot get it to work.

I have accomplished this with helo's, but planes are different. The ILS, taxiways, runways, and airfields are harder to script.

Thanks for any help.

Share this post


Link to post
Share on other sites

I have used the ambientFlyBy and its not what I want. I want which ever map I choose to have its own airplane traffic. I have a script for helo's already, but planes are harder to sript.

 

If I could get the BIS_fnc_ambientplanes.fsm to work, I would be set.

 

Thanks,

Reed 

Share this post


Link to post
Share on other sites

Okay I've gotten to the root of your problems from what I can see the code in the fsm you are attempting to use unfortunately won't work. The reason for it not working is it is attempting to pull from the cfgWorlds file an entry that actually doesn't exist.

"ilsAmbientPlanes" an entry that doesn't exist.

_addAirport = {" \n
       "" \n
       "    //--- Ambient planes allowed?" \n
       "    _ilsRadius = getnumber (_this >> ""ilsAmbientPlanes"");" \n
       "    if (_ilsRadius > 0) then {" \n
       "" \n
       "        _class = configname _this;" \n
       "" \n
       "        //--- Position - extract only XY" \n
       "        _ilsPosition = getarray (_this >> ""ilsPosition"");" \n
       "        _ilsPosition resize 2;" \n
       "" \n
       "        //---Direction - original value is XZY, convert to XY" \n
       "        _ilsDirection = getarray (_this >> ""ilsDirection"");" \n
       "        _airportVector = [" \n
       "            _ilsDirection select 0," \n
       "            _ilsDirection select 2," \n
       "            _ilsDirection select 1" \n
       "        ];" \n
       "" \n
       "        //--- Convert vector to direction" \n
       "        _airportDir = [_airportVector,[0,0,0]] call bis_fnc_dirto;" \n
       "" \n
       "        //--- Register" \n
       "        if (count _ilsPosition >= 2) then {" \n
       "            _listAirports set [" \n
       "                count _listAirports," \n
       "                _ilsPosition + [_airportDir]" \n
       "            ];" \n
       "        };" \n
       "    };" \n
       "};" \n

So if there is no ilsAmbientPlanes entry with the allowed planes then the script will fail.  as it can't pull an entry from get a value from getNumber() which is ILS. You could modify the FSM completely to use it.

instrument landing system (ILS) thats my best guess to what it is, but there is no entries so it doesn't exist so _local variables are undefined so the script fails when trying to call BIS_fnc_spawnVehicle

Share this post


Link to post
Share on other sites

Thanks for the response.

 

I tried modifying the FSM, but scripting is way over my head. I wonder if replacing some of the ILS parameters with actual coordinates from the each airport would work?

Share this post


Link to post
Share on other sites

So, I have taken a different approach.

 

On Tanoa, I have placed a BTT Cesat at each outlying airport and used a move, land, move, land, cycle waypoint scheme. This has worked well. The planes taxi, takeoff, land, taxi, takeoff, land, and repeat. This works very well for what I need.

 

Now I am trying to set each aircraft up for flying. For example, in the init of each plane(p1,p2,p3,p4) I have added;

_vehicle setSpeedMode "Full"; 
_vehicle setBehaviour "CARELESS";
_vehicle setPilotLight true;
_vehicle setCollisionLight true;

How can I script this, so when I add more planes, I dont need to use each aircrafts init?

 

Thanks,

Jason

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
Sign in to follow this  

×