Jump to content

Adding In Enemy CAS


Recommended Posts

Yes, first off since I'm new like to say thanks for what your group does, amazing game mode.  Now to the point at hand.  I'm looking to see if I can acquire some help from your scripting staff.  I'm using the F/A-18 mod from armaholic.com (beautiful mod) and was trying to put in the buzzards to spawn w/ ao's as enemy jets (already set independents as allies to opfor) and I see in the script where the mi-48's spawn, and added in the planes class name, and it does spawn w/ the ao just crashed/empty not sure which, all I do know is its not an active target as I'll target it w/ my jet and it shows it on the ground and the name in grey.  From the script I assume it crashed as (again a guess) there is no pilot put into it.  Assuming I've read the scripting write it would spawn like the helo and be at an alt of 1000 w/ engines on etc but w/o a pilot the plane that does manage to spawn just falls to the ground.  If someone would be willing to help me out in adjusting the inf script to allow me to spawn in a buzzard cas (i know the class name not off hand) I'd appreciate it.  I'd like it to spawn 2 of them with an ao or spawn in three attack choppers (instead of the one that currently spawns).  Just fyi I tried to manually add in a pilot to it but what I did seemed to break the script all together.  Here is what I had.

 

if((random 10 <= PARAMS_AirPatrol)) 
     then {
     _airGroup = createGroup east;
     _randomPos = [getMarkerPos currentAO, PARAMS_AOSize] call aw_fnc_randomPos;
     _airType = if(random 1 <= 0.5) then {"O_Heli_Attack_02_F"} else {"O_Heli_Attack_02_F"};
     _air = _airType createVehicle [_randomPos select 0,_randomPos select 1,1000];
     waitUntil{!isNull _air};
     _air engineOn true;
     _air lock 3;
     _air setPos [_randomPos select 0,_randomPos select 1,300];
 
     _air spawn 
     {
         private["_x"];
         for [{_x=0},{_x<=200},{_x=_x+1}] do
         {
              _this setVelocity [0,0,0];
              sleep 0.1;
          };
      };
 
      if(_airType == "I_Plane_Fighter_03_CAS_F") then
      {
            "I_Pilot_F" createUnit [_randomPos,_airGroup];
            ((units _airGroup) select 0) assignAsDriver _air;
            ((units _airGroup) select 0) moveInDriver _air;
       }
 
       "O_crew_F" createUnit [_randomPos,_airGroup];
       ((units _airGroup) select 0) assignAsDriver _air;
       ((units _airGroup) select 0) moveInDriver _air;
 
       if(_airType == "O_Heli_Attack_02_F") then
       {
            "O_crew_F" createUnit [_randomPos,_airGroup];
            ((units _airGroup) select 1) assignAsGunner _air;
            ((units _airGroup) select 1) moveInGunner _air;
       };
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Forum Statistics

    11.1k
    Total Topics
    66.4k
    Total Posts
×
×
  • Create New...