Post mission init-add CAS unit

  1. 8 years ago
    Edited 8 years ago by tallguyjv

    I am looking to add a CAS unit after mission init. I have an airplane scripted from taxi to take off along with 40 of his buddies on the Nimitz. I created a dynamic taxi,take off,landing, rearm/refuel hanger to deck script for Nimitz controller for AI. Once the plane is done with its "thing" i would like it to be an option for CAS. I have tried the alive_fnc_cas and alive_fnc_casint without success. Furthest I have gotten is I have no idea what things I should put in the passed parameters in order to get this to work. I know I maybe using the wrong functions also. If there is a way to remove a CAS unit that would also be valuable intel. Has anyone worked with CAS functions or added a CAS unit post mission init?

  2. I think this got overlooked.. .BUMP!

  3. I know there is a function for this that Gunny added awhile ago. Will try to find it!

  4. Edited 8 years ago by SpyderBlack723

    Okay, I believe you'll want to use ALiVE_fnc_CombatSupportAdd and ALiVE_fnc_combatSupportRemove.

    You'll want to call ALiVE_fnc_combatSupportAdd with the following parameters:

    [_type,_settings] call ALiVE_fnc_CombatSupportAdd;

    _type : The type of combat support, can be "CAS","TRANSPORT","ARTILLERY"
    _settings: Array of settings
    0: Position of vehicle
    1: Direction of vehicle
    2: Classname of vehicle
    3: Callsign of vehicle (string)
    4: Code to be ran on vehicle spawn
    5: Height of vehicle

    So, to add an attack helicopter to the CAS list, you would do..

    ["CAS",[getPos player,0,"B_Heli_Attack_01_F","EAGLE ONE",{},0]] call ALiVE_fnc_CombatSupportAdd;

    For combat support remove..

    [_side,_type,_callsign] call ALiVE_fnc_combatSupportRemove;

    So, to remove the vehicle created above..

    ["WEST","CAS","EAGLE ONE"] call ALiVE_fnc_combatSupportRemove;
  5. Great... added to wiki:

    http://alivemod.com/wiki/index.php/Script_Snippets

  6. Thanks m'Lady :)

  7. Lol

  8. I do look good in a sun dress...

  9. 6 years ago

    Where do I run this command?

  10. Any place that is viable to run code. It could be in the onActivation field of a trigger, a script file, a waypoint completion statement.

 

or Sign Up to reply!