Jump to content

panther42

Member
  • Content Count

    774
  • Joined

  • Last visited

  • Medals

Posts posted by panther42


  1. On 8/11/2023 at 1:24 PM, Ramsen V said:

    Two issues:

     

    Prairie Fire Mortars/Arty/Smoke Grenades etc.

    First, as the title relates, I cannot get the Prairie Fire Mortars, Artillery, Smoke Grenades (or anything else of this type) to fire.

    I have to substitute the mortars M29, M2, Type 63 and Type 53 with the Mk 6 Mortar from NATO/CSAT

    The M4 Scorcher is a substitute for the artillery.

    I substitute the PF smoke grenades with the vanilla smoke grenades.

     

    I suspect it's to do with the ammo classes for all of these?

     

    For smoke I use the vanilla "8Rnd_82mm_Mo_Smoke_white" for mortars (the Prairie Fire 60mm, 81mm and 82mm variants never fire.)

    For arty I use "6Rnd_155mm_Mo_smoke"

    And as mentioned previously the vanilla classes for smoke grenades.

     

    Forgive me, but I cannot remember the PF classes nor have the time right now to look them up - but I had previously tried them.

     

    So what's up with this? Why can I not get the PF shells to work via script? If you can get them to work what Ammo classes do you have that's working?

     

    Any help welcome.

    go to this wiki page for Savage Game Design, and scroll/search down to vn_mortar_m29 entry.

    This list (and links within) gives all the information you should need.


  2. @jgaz-uk not quite certain why you'd want to edit the mission.sqm everytime, but to each their own. 

    You did restore my interest to this wounding system, so I went back and made some edits to the last version published by @Psychobastard.

    Based on AIS release 30072018

    Spoiler

    1. Corrected ais_InitHost check: if (!isNil {_unit getVariable "ais_aisInit"}) then... - would not run AIS_Core_fnc_setVariables for new units due to the logic of statement (single player at least); changed to: if (isNil {_unit getVariable "ais_aisInit"}) then...
    this affected fn_findAIHelper as the side for unit variable (ais_side) was never set via AIS_Core_fnc_setVariables - ended up being civilian due to default getVariable and no civilian groups in mission, etc. (psycho stated civilian due to setCaptive, but the variable is never set to anything other than starting side in AIS_Core_fnc_setVariables)

     

    2. Added simple S.O.G. (fak/medikit) checks for AIS_MEDICAL_EDUCATION in fn_allowRevive (this is players only), fn_removeFaks, & fn_restoreFaks


    3. Removed check for player's group in fn_AIselfCheck to allow AI in player's group to take care of wounded; decreased delay a bit to find helper.  Remove the comment marks if you'd rather player group was not part of AI healing and want to do it via player.


    4. Added variable to AI, ais_isHelper, to allow selection of next available AI to help - used in fn_findAIHelper, etc.


    5. Added checks in fn_findAIHelper to sort via distance (within squad & near groups if selected - AIS_REVIVE_INIT_UNITS) and qualifications per AIS_MEDICAL_EDUCATION selection (S.O.G. added).  Will check for next available if selection is busy (ais_isHelper)


    6. fn_handleHeal - set up separate spawned file from fn_handleHeal, fn_handleHealreviveAI, as HandleHeal Event Handler is fired from action (Heal, HealSoldier, HealSoldierSelf) - if engine heal action directed via AI team leader or self heal by AI, no use to run the AIS fn_ReviveAI (animations/attach/detach,etc.);
        fn_ReviveAI still run for AIS handled units (not ordered via action Heal, HealSoldier, HealSoldierSelf)


    7. Added AISFinishHeal to fn_handleHealreviveAI to deal with AI only groups healing more than the AIS damage of .89 (if not medic) - unit will only be healed to .89 damage unless they self heal or healed by another team member when unit ais_unconscious variable is false.


    8. Moved fn_restoreFaks call from fn_handleHeal (EventHandler) to fn_handleHealreviveAI - this makes sure faks are not restored prior to lengthy AIS revive time process


    9. Added check for medic trait in fn_ReviveAI & fn_handleHealReviveAI to heal 100% if helper is medic - was only if(AIS_REVIVE_HEAL) but changed to if (AIS_REVIVE_HEAL || _healer getUnitTrait "Medic")


    10. Set p42_debug = false; in Core >> fn_preinit to get rid of diag_log info added by me

     

    test mission link: p42_AIS_test  *** this is with SOG loaded and set on Cam Lao Nam ***  you could take the files and place in your own test mission

    Two squads next to each other, your squad, and AI squad.  I have set AIS_MEDICAL_EDUCATION = 2 (medics only) and removed medic from AI squad.  You cannot stop AI leader from sending AI team member to heal, but the above changes I made should leave unit with .89 damage until they self heal, player heals, or another team member heals while the unit is not ais_unconscious = true.

    Shoot at members in AI squad, or your squad members (preferably not medic) to test.  Can test multiple medics in your squad helping other squad if you shoot multiple members of the AI squad.

    Made one small change for anyone who did download the above test mission.

    If no one is found as a helper via fn_findAIHelper = objNull (all unconscious or busy helpers), I added a check after delay to kick the sequence back to fn_AIselfCheck and check for helper again.

    Replace in System >> fn_findAIHelper the following (should be line 121):

    Spoiler
    
    if (isNull _helper) exitWith {diag_log format ["############## %1 ############## - AIS findAIHelper helper isNull", missionName]};
    
    With:
    if (isNull _helper) exitWith 
    {
    	if (p42_debug) then {diag_log format ["############## %1 ############## - AIS findAIHelper helper isNull... searching again", missionName]};
    	private _acc_time = (diag_tickTime + 10);
    	[{diag_tickTime > (_this select 1)}, {_this call AIS_System_fnc_AIselfCheck}, [_injured, _acc_time]] call AIS_Core_fnc_waitUntilAndExecute;
    };

     

    And... if anyone is questioning, when AI is ordered to Heal via AI team leader, they will repeat the heal action over and over until the built in timer expires for injured unit to be restored to consciousness.  Just something to live with, unless someone has a better option intercepting HandleHeal EH

    • Like 2

  3. Just edit the files in A3 Wounding System.

    I find three which mention Medikit or FirstAidKit.

    SOG has:

    vn_b_item_firstaidkit for U.S.

    vn_o_item_firstaidkit for PAVN

    and vn_b_item_medikit_01

     

    Add with "or" statements, or edit how you would like in:
    fn_allowRevive.sqf

    fn_restoreFaks.sqf

    fn_removeFaks.sqf

     

    Comment: I have significantly edited my copy, so those files may be different names, not certain with what is current download.

    You could also do something like this to keep compatibility:

    Spoiler
    
    if (1227700 in (getDLCs 1)) then
    {
    	Do SOG stuff here;
    }
    else
    {
    	other stuff here;
    };

     

     


  4. It can be done.  I've used an edited script of mando_chute.

    Easiest way to show implemented is to download @Beerkan Simple ParaDrop Script (latest version).

    Replace eject.sqf with the following code.  I have only edited a bit and added the edited mando_chute (all credits to Beerkan & Mandoble) for demonstration:

    Spoiler
    
    /*
        Filename: Simple ParaDrop Script v0.99d eject.sqf
        Author: Beerkan
       
        Description:
         A Simple Paradrop Script
        Parameter(s):
        0: VEHICLE  - vehicle that will be doing the paradrop (object)
        1: ALTITUDE - (optional) the altitude where the group will open their parachute (number)
        2: CARGOITEM - (optional) the item or ammocrate you wish to paradrop with the paras
       
       Working Example without Cargo
       0 = [UH80, 100] execVM "eject.sqf"
    
       Working Example with Supply Crate
       0 = [UH80,150,"B_supplyCrate_F"] execVM "eject.sqf"
    
       Working example with Prowler Vehicle
       0 = [UH80,150,"B_T_LSV_01_armed_F"] execVM "eject.sqf"
    
    */ 
    
    if (!isServer) exitWith {};
    params [["_vehicle",objnull],["_chuteheight",100],["_item",nil]];
    private ["_paras","_landZone","_crew","_dir"];
    //_vehicle = _this select 0;
    //_chuteheight = if ( count _this > 1 ) then { _this select 1 } else { 100 };// Height to auto-open chute.
    //_item = if ( count _this > 2 ) then {_this select 2} else {nil};// Cargo to drop, or nothing if not selected.
    _paras = [];
    _landZone = getMarkerPos "mk_land";
    _crew = crew _vehicle;
    {
    	private _iscrew = assignedVehicleRole _x;
    	if(count _iscrew > 0) then
    	{
    		if((_iscrew select 0) == "Cargo") then
    		{
    			_paras pushback _x
    		};
    	};
    } foreach _crew;
    
    //_vehtype = typeof _vehicle;
    
     //HintSilent composeText [parsetext format["<t size='1'  font='Zeppelin33' shadow = '2' align='left' color='#f0e68c'>Para Units found = <t color='#ff0000'>%1",count _paras]];//Debug
    
    _vehicle allowDamage false;
    _dir = direction _vehicle;
    
    /*
    //Animate Vehicle Doors to open
    
    If (typeof _vehicle in ["B_Heli_Transport_01_F","B_Heli_Transport_01_camo_F"," B_CTRG_Heli_Transport_01_tropic_F","B_CTRG_Heli_Transport_01_sand_F"]) then
     {_vehicle animateDoor ['door_R',1];_vehicle animateDoor ['door_L',1]};
    
    If (typeof _vehicle in ["I_Heli_Transport_02_F"]) then {_vehicle animateDoor ["CargoRamp_Open",1]};
    
    If (typeof _vehicle in ["B_T_VTOL_01_infantry_F","B_T_VTOL_01_vehicle_F","B_T_VTOL_01_armed_F","B_T_VTOL_01_infantry_blue_F","B_T_VTOL_01_infantry_olive_F","B_T_VTOL_01_vehicle_blue_F","B_T_VTOL_01_armed_blue_F","B_T_VTOL_01_armed_olive_F"]) then {_vehicle animateDoor ["Door_1_source",1]};
    
    If (typeof _vehicle in
    ["RHS_UH60M_MEV","RHS_UH60M_d"]) then {_vehicle animateDoor ["DoorLB",1];_vehicle animateDoor ["DoorRB",1]};
    
    If (typeof _vehicle in
    ["B_Heli_Transport_03_F","B_Heli_Transport_03_unarmed_F","B_Heli_Transport_03_black_F","B_Heli_Transport_03_unarmed_green_F"])
    then {_vehicle animateDoor ["door_rear_source", 1, false]};
    */
    
    sleep 2;
    
    ParaLandSafe =
    {
        params ["_unit","_chuteheight","_landZone"];
        
        (vehicle _unit) allowDamage false;
        if (isPlayer _unit) then {[_unit,_chuteheight] spawn OpenChute};//Set AutoOpen Chute if unit is a player
    	[_unit, _landZone, 20] spawn p42_mando_chute;
        waitUntil { isTouchingGround _unit || (position _unit select 2) < 1 };
        _unit action ["eject", vehicle _unit];
        sleep 1;
        _unit setUnitLoadout (_unit getVariable ["Saved_Loadout",[]]);// Reload Saved Loadout
        _unit allowdamage true;// Now you can take damage.
    };
    
    OpenChute =
    {
        params ["_paraUnit", "_chuteheight"];
        
        waitUntil {(visiblePosition _paraUnit select 2) <= _chuteheight};
        If (vehicle _paraUnit IsEqualto _paraUnit ) then {_paraUnit action ["openParachute", _paraUnit]};//Check if chute is open, if not open it.
    };
    
    p42_mando_chute =
    {
    	/*
    		mando_chute.sqf v1.1
    		by Mandoble - edited by panther42 2014
    
    		Moves a chute to the landing position
    
    		Parameters:
    		unit ejecting: a soldier.
    		target position: a 2D or 3D map position.
    		radius from target, max distance from target position to aim.
    		Type of chute to be used (its class),"" if you dont care.
    
    		Ex.:
    		[chuteman, getMarkerPos "mk_land", 20] execVM "p42_mando_chute.sqf";
    	*/
    
    	params ["_man","_target_pos","_rad"];
    	private["_chuto", "_deg_sec", "_dir", "_ang", "_posc", "_dif", "_difabs", "_turn", "_hspd", "_max_spd", "_deltatime", "_timeold", "_vx", "_vy", "_vh", "_vz", "_acc", "_cone", "_type", "_vvel", "_vdir", "_vup"];
    	
    	if (count _target_pos == 2) then
    	{
    		_target_pos append [0];
    	};
    	_ang = random 360;
    	_target_pos = [(_target_pos select 0)+sin(_ang)*_rad,(_target_pos select 1)+cos(_ang)*_rad, 0];
    
    	Sleep 1;
    	_deg_sec = 30;
    	_max_spd = 4;
    	_hspd = _max_spd;
    	_acc = 2;
    	_vh = 0;
    	_vz = -3;
    	waitUntil {(vehicle _man != _man) || (!alive _man)};
    	if (!alive _man) exitWith {};
    
    	_chuto = vehicle _man;
    	_timeold = time;
    	_dir = getDir _chuto;
    	_chuto setDir _dir;
    
    	while {alive _man && ((visiblePosition _chuto select 2) > 5)} do
    	{
    		_deltatime = (time-_timeold) max 0.001;
    		_timeold = time;
    	   
    		_posc = visiblePositionASL _chuto;
    		_ang = ((_target_pos select 0) - (_posc select 0)) atan2 ((_target_pos select 1) - (_posc select 1));
    		if (([_target_pos select 0, _target_pos select 1, 0] distance [_posc select 0, _posc select 1, 0]) > (visiblePosition _chuto select 2)) then
    		{
    			if ((_vz + 0.5*_deltatime) < -1.5) then
    			{
    				_vz = _vz + 0.5*_deltatime;
    			};
    		}
    		else
    		{
    			if ((_vz - 0.5*_deltatime) > -3) then
    			{
    				_vz = _vz - 0.5*_deltatime;
    			};
    		};
    
    		_dif = (_ang - _dir);
    		if (_dif < 0) then {_dif = 360 + _dif;};
    		if (_dif > 180) then {_dif = _dif - 360;};
    		_difabs = abs(_dif);
    
    		if (_difabs > 0.01) then
    		{
    			_turn = _dif/_difabs;
    		}
    		else
    		{
    			_turn = 0;
    		};
    
    		_dir = _dir + (_turn * ((_deg_sec * _deltatime) min _difabs));
    
    		if (_vh < _hspd) then
    		{
    			_vh = _vh + (_acc * _deltatime);
    		}
    		else
    		{
    			if (_vh > _hspd) then
    			{
    				_vh = _vh - (_acc * _deltatime);  
    			};
    		};
    
    		if (_difabs > 45) then
    		{
    			_hspd = _max_spd / 3;
    		}
    		else
    		{
    			_hspd = _max_spd;
    		};
    
    		_chuto setVectorDirAndUp [[sin _dir,cos _dir,0],[0,0,1]];
    		_chuto setVelocity [sin(_dir)*_vh, cos(_dir)*_vh, _vz];
    		
    		Sleep 0.01;
    	};
    };
    
    {
        _x setVariable ["Saved_Loadout",getUnitLoadout _x];// Save Loadout
        removeBackpack _x;
        _x disableCollisionWith _vehicle;// Sometimes units take damage when being ejected.
        _x allowdamage false;// Good Old Arma, they still can take damage on Vehcile exit.
        unassignvehicle _x;
        moveout _x;
        _x setDir (_dir + 90);// Exit the chopper at right angles.
        _x setvelocity [0,0,-5];
        sleep 0.3;//space the Para's out a bit so they're not all bunched up.
        _x addBackPack "B_parachute";// Add parachute on exit of _vehicle. AI will immediately open it, players can open it at any height above _chuteheight
    	[_x,_chuteheight,_landZone] spawn ParaLandSafe;	
    } forEach _paras;
    
    if (!isNil ("_item")) then
    {
    	_CargoDrop = _item createVehicle getpos _vehicle;
    	_CargoDrop setPos [(position _vehicle select 0) - (sin (getdir _vehicle)* 15), (position _vehicle select 1) - (cos (getdir _vehicle) * 15), (position _vehicle select 2)];
    	clearMagazineCargoGlobal _CargoDrop;clearWeaponCargoGlobal _CargoDrop;clearItemCargoGlobal _CargoDrop;clearbackpackCargoGlobal _CargoDrop;
    	[objnull, _CargoDrop] call BIS_fnc_curatorobjectedited;
    	_CargoDrop addaction ["<t color = '#00FF00'>Open Virtual Arsenal</t>",{["Open",true] call BIS_fnc_arsenal;}];
    };
    
    _vehicle allowDamage true;

     

    Open the mission in the editor.

    Place a marker on the ground, near you, or wherever close so you can see, and name it mk_land.

    Save the mission.

    Play and observe where the AI troops steer/land.

     

    You can edit/use as you see fit.  This was just a "throw together something quick" for demo purpose.


  5. 5 hours ago, pierremgi said:

    Yes nice!

    I'm trying to list all possible groups also (coming from cfgGroups) inside a module dialog (list and module dialog are not a problem). I can't just add a custom list (array variable) like I can add an hard coded combo box...

    The aim is NOT setting classes for all groups of an addon, but picking an array to make it as a droppable or scrollable list in this module menu.

    Any hints? Searching for days.

    Not exactly certain I understand what you are asking, but here is a way I do it for extracting groups.  Multiple ways to skin this one.

    Example is simple script which can be placed in mission folder and executed from wherever (debug console)

    PF is odd for some groups, as VN_MACV is all groups listed for faction B_MACV.

    Spoiler
    
    private _outCfgHash = [];
    private _cfgGrpSide = "West";  //enter side, or pull from dropdown, etc.
    private _cfgGrpFaction = ["VN_MACV", "B_CIA"]; //enter faction(s) or grab from dropdown, etc.
    private _factions = "((configName _x) in _cfgGrpFaction)" configClasses (configFile >> "CfgGroups" >> _cfgGrpSide);
    
    {	// faction level
    
    	_outFacNam = configName _x;
    	
    	private _groupTypes = "true" configClasses _x;
    	{	// groupType level
    		private _groups = "true" configClasses _x;
    		private _outCfgGrpHash = [];
    		private _outCfgGrpTyp = [];
    		private _outCfgGrpTypHash = [];
    
    		_outCfgGrpHash pushback (_outFacNam + "_" + configName _x); //can be done other ways, but I like to see since there can be multiple factions with same type of group (if you select more than one) panther42		
    
    		{	// group level
    			
    			_outCfgGrpTyp pushback configName _x;
    			_outCfgGrpTypHash pushback configName _x;
    
    			//private _units = "true" configClasses _x;  if you want units also...
    			
    			//{
    			//	_output pushBack getText (_x >> "vehicle");
    
    			//} forEach _units;			
    		} forEach _groups;
    
    		_outCfgGrpHash pushBack _outCfgGrpTypHash;
    		_outCfgHash pushback _outCfgGrpHash;
    	} forEach _groupTypes;	
    } forEach _factions;
    
    private _myFilledMap = createHashMapFromArray _outCfgHash;
    
    _myFilledMap apply {diag_log [_x, _y]};
    diag_log (keys _myFilledMap);

     

    And the output in log (for example):

    Spoiler
    
    ["VN_MACV_vn_b_group_armor_army",["vn_b_group_armor_army_01","vn_b_group_armor_army_02","vn_b_group_armor_army_03"]]
    ["VN_MACV_vn_b_group_armor_usmc",["vn_b_group_armor_usmc_01","vn_b_group_armor_usmc_02","vn_b_group_armor_usmc_03"]]
    ["VN_MACV_vn_b_group_men_lrrp",["vn_b_group_men_lrrp_01"]]
    ["VN_MACV_vn_b_group_mech_army",["vn_b_group_mech_army_01","vn_b_group_mech_army_02","vn_b_group_mech_army_03","vn_b_group_mech_army_04","vn_b_group_mech_army_05","vn_b_group_mech_army_06","vn_b_group_mech_army_07","vn_b_group_mech_army_08","vn_b_group_mech_army_09","vn_b_group_mech_army_10","vn_b_group_mech_army_11","vn_b_group_mech_army_12"]]
    ["VN_MACV_vn_b_group_men_seal_db",["vn_b_group_men_seal_db_01","vn_b_group_men_seal_db_02"]]
    ["VN_MACV_vn_b_group_motor_army",["vn_b_group_motor_army_01","vn_b_group_motor_army_02","vn_b_group_motor_army_03","vn_b_group_motor_army_04","vn_b_group_motor_army_05","vn_b_group_motor_army_06","vn_b_group_motor_army_07","vn_b_group_motor_army_08"]]
    ["VN_MACV_vn_b_group_men_cidg",["vn_b_group_men_cidg_01","vn_b_group_men_cidg_02","vn_b_group_men_cidg_03","vn_b_group_men_cidg_04","vn_b_group_men_cidg_05"]]
    ["VN_MACV_vn_b_group_static_navy",["vn_b_group_static_navy_01","vn_b_group_static_navy_02"]]
    ["VN_MACV_vn_b_group_men_army",["vn_b_group_men_army_01","vn_b_group_men_army_02","vn_b_group_men_army_03","vn_b_group_men_army_04","vn_b_group_men_army_05","vn_b_group_men_army_06","vn_b_group_men_army_07","vn_b_group_men_army_08","vn_b_group_men_army_09"]]
    ["VN_MACV_vn_b_group_air_navy",["vn_b_group_air_navy_01","vn_b_group_air_navy_02","vn_b_group_air_navy_03","vn_b_group_air_navy_04","vn_b_group_air_navy_05","vn_b_group_air_navy_06","vn_b_group_air_navy_07","vn_b_group_air_navy_08"]]
    ["VN_MACV_vn_b_group_men_seal_nad",["vn_b_group_men_seal_nad_01","vn_b_group_men_seal_nad_02","vn_b_group_men_seal_nad_03","vn_b_group_men_seal_nad_04","vn_b_group_men_seal_nad_05"]]
    ["VN_MACV_vn_b_group_boats",["vn_b_group_boat_01","vn_b_group_boat_02","vn_b_group_boat_03","vn_b_group_boat_04","vn_b_group_boat_05","vn_b_group_boat_06"]]
    ["VN_MACV_vn_b_group_air_usmc",["vn_b_group_air_usmc_01","vn_b_group_air_usmc_02","vn_b_group_air_usmc_03","vn_b_group_air_usmc_04","vn_b_group_air_usmc_05","vn_b_group_air_usmc_06","vn_b_group_air_usmc_07","vn_b_group_air_usmc_08","vn_b_group_air_usmc_09","vn_b_group_air_usmc_10","vn_b_group_air_usmc_11","vn_b_group_air_usmc_12"]]
    ["VN_MACV_vn_b_group_men_aircrew",["vn_b_group_men_cobra_01","vn_b_group_men_cobra_02","vn_b_group_men_cobra_03","vn_b_group_men_plane_01","vn_b_group_men_plane_02","vn_b_group_men_plane_03","vn_b_group_men_plane_04","vn_b_group_men_plane_05","vn_b_group_men_plane_06","vn_b_group_men_uh1_01","vn_b_group_men_uh1_02","vn_b_group_men_uh1_03","vn_b_group_men_uh1_04","vn_b_group_men_uh1_05","vn_b_group_men_uh1_06"]]
    ["VN_MACV_vn_b_group_air_army",["vn_b_group_air_army_01","vn_b_group_air_army_02","vn_b_group_air_army_03","vn_b_group_air_army_04","vn_b_group_air_army_05","vn_b_group_air_army_06","vn_b_group_air_army_07","vn_b_group_air_army_08","vn_b_group_air_army_09"]]
    ["VN_MACV_vn_b_group_static_sf",["vn_b_group_static_sf_01","vn_b_group_static_sf_02","vn_b_group_static_sf_03","vn_b_group_static_sf_04","vn_b_group_static_sf_05","vn_b_group_static_sf_06","vn_b_group_static_sf_07","vn_b_group_static_sf_08","vn_b_group_static_sf_09","vn_b_group_static_sf_10"]]
    ["B_CIA_vn_b_group_men_cia",["vn_b_group_men_cia_01"]]
    ["VN_MACV_vn_b_group_men_sog",["vn_b_group_men_sog_01","vn_b_group_men_sog_02","vn_b_group_men_sog_03","vn_b_group_men_sog_04"]]
    ["VN_MACV_vn_b_group_men_navy",["vn_b_group_men_navy_01"]]
    ["VN_MACV_vn_b_group_air_usaf",["vn_b_group_air_usaf_01","vn_b_group_air_usaf_02","vn_b_group_air_usaf_03","vn_b_group_air_usaf_04","vn_b_group_air_usaf_05","vn_b_group_air_usaf_06","vn_b_group_air_usaf_07","vn_b_group_air_usaf_08","vn_b_group_air_usaf_09","vn_b_group_air_usaf_10","vn_b_group_air_usaf_11","vn_b_group_air_usaf_12","vn_b_group_air_usaf_13","vn_b_group_air_usaf_14"]]
    ["VN_MACV_vn_b_group_static_army",["vn_b_group_static_army_01","vn_b_group_static_army_02","vn_b_group_static_army_03","vn_b_group_static_army_04","vn_b_group_static_army_05","vn_b_group_static_army_06","vn_b_group_static_army_07","vn_b_group_static_army_08","vn_b_group_static_army_09","vn_b_group_static_army_10"]]
    ["VN_MACV_vn_b_group_men_seal",["vn_b_group_men_seal_01","vn_b_group_men_seal_02","vn_b_group_men_seal_03","vn_b_group_men_seal_04","vn_b_group_men_seal_05","vn_b_group_men_seal_06"]]
    ["VN_MACV_vn_b_group_men_seal_udt",["vn_b_group_men_seal_udt_01","vn_b_group_men_seal_udt_02","vn_b_group_men_seal_udt_03"]]
    ["VN_MACV_vn_b_group_static_seal",["vn_b_group_static_seal_01","vn_b_group_static_seal_02","vn_b_group_static_seal_03","vn_b_group_static_seal_04"]]
    ["B_CIA_vn_b_group_air_cia",["vn_b_group_air_cia_01"]]
    ["VN_MACV_vn_b_group_men_sf",["vn_b_group_men_sf_01","vn_b_group_men_sf_02","vn_b_group_men_sf_03","vn_b_group_men_sf_04","vn_b_group_men_sf_05"]]
    ["VN_MACV_vn_b_group_armor_army","VN_MACV_vn_b_group_armor_usmc","VN_MACV_vn_b_group_men_lrrp","VN_MACV_vn_b_group_mech_army","VN_MACV_vn_b_group_men_seal_db","VN_MACV_vn_b_group_motor_army","VN_MACV_vn_b_group_men_cidg","VN_MACV_vn_b_group_static_navy","VN_MACV_vn_b_group_men_army","VN_MACV_vn_b_group_air_navy","VN_MACV_vn_b_group_men_seal_nad","VN_MACV_vn_b_group_boats","VN_MACV_vn_b_group_air_usmc","VN_MACV_vn_b_group_men_aircrew","VN_MACV_vn_b_group_air_army","VN_MACV_vn_b_group_static_sf","B_CIA_vn_b_group_men_cia","VN_MACV_vn_b_group_men_sog","VN_MACV_vn_b_group_men_navy","VN_MACV_vn_b_group_air_usaf","VN_MACV_vn_b_group_static_army","VN_MACV_vn_b_group_men_seal","VN_MACV_vn_b_group_men_seal_udt","VN_MACV_vn_b_group_static_seal","B_CIA_vn_b_group_air_cia","VN_MACV_vn_b_group_men_sf"]

     

    Forgot, and cut off the top of my script while posting.  Cheatsheet:

    Spoiler
    
    // VN_MACV >> faction = "B_MACV"
    // B_CIA >> faction = "B_CIA"
    // VN_AUS >> faction = "B_AUS"
    // VN_NZ >> faction = "B_NZ"
    // VN_ROK >> faction = "B_ROK"
    
    // VN_PAVN >> faction = "O_PAVN"
    // VN_VC >> faction = "O_VC"
    // VN_PL >> faction = "O_PL"
    
    // VN_ARVN >> faction = "I_ARVN"
    // VN_RLA >> faction = "I_LAO"

    Also, that units part won't work as is, as I had removed some parts.  Can be easily rectified

     

    • Like 1

  6. @sarogahtyp, thanks for the testing.
    It's not necessarily a test of the "other" mechanics of the script, so to speak, but a test of setVelocityTransformation in relation to use with helicopter (in this case), or possibly other aircraft.

    Does it work, can it work with better input numbers, is it useless...

    There are plenty of other methods, this is just an option.
    All setup, like distance from landing point to start landing, creating the landing point location, adjustment of the duration (I.E. bit too fast) would be user preference.

    If you set flyInHeightASL, or flyInHeight to a higher number, obviously, your approach angle will be higher/may avoid obstacles.

    As for the water position, this could be alleviated by simply creating a marker at your position (ASL conversion), and creating the helipad at that location, or, as you noted BIS_fnc_findSafePos/another method.

    Perhaps I was not "clear" enough with the title of thread "Proof of concept testing: setVelocityTransformation".

    I appreciate all of the testing you have done.  My example was thrown together to test the application of setVelocityTransformation on aircraft, specifically helicopters.

     

    As a side note, while researching this command, I found a post by @Harzach which I thought was pretty cool.  This specific post has the link to updated video.

     


  7. Fair enough @sarogahtyp.

    Paste the following in debug console:

    Spoiler
    
    0 = [] spawn 
    {
    	private ["_posCaller", "_spawnPos", "_spawnDir", "_spawnRange", "_vecDir", "_markerLZ", "_heliSpawn", "_heliPilot", "_typeHeli", "_lz", "_targetPad", "_maxDist"];
    
    	_posCaller = getPos player;
    	_spawnDir = getDir player; // face the direction you want helicopter to arrive from
    	_spawnRange = 3000;     // distance to spawn the helicopter from player location
    
    	_spawnPos = _posCaller getPos [_spawnRange, _spawnDir];
    	_vecDir = _spawnPos getDir _posCaller;
    
    	_heliSpawn = [];
    
    	call {
    		if (playerSide isEqualTo west) exitWith {_heliSpawn = [_spawnPos, _vecDir, selectRandom ["B_Heli_Transport_01_F","B_Heli_Transport_03_F"], WEST] call BIS_fnc_spawnVehicle};
    		if (playerSide isEqualTo east) exitWith {_heliSpawn = [_spawnPos, _vecDir, selectRandom ["O_Heli_Light_02_F","O_Heli_Transport_04_covered_F"], EAST] call BIS_fnc_spawnVehicle};
    		if (playerSide isEqualTo resistance) exitWith {_heliSpawn = [_spawnPos, _vecDir, selectRandom ["I_Heli_light_03_F","I_Heli_Transport_02_F"], RESISTANCE] call BIS_fnc_spawnVehicle};
    		if (playerSide isEqualTo civilian) exitWith {_heliSpawn = [_spawnPos, _vecDir, selectRandom ["C_Heli_Light_01_civil_F","C_IDAP_Heli_Transport_02_F"], CIVILIAN] call BIS_fnc_spawnVehicle};
    	};
    
    	_heliSpawn params ["_heli", "_crewHeli", "_grpHeli"];
    	_heliPilot = driver _heli;
    	_heliPilot setskill 0.7;
    	_heliPilot setCombatMode "YELLOW";
    	_heliPilot setBehaviour "CARELESS";
    	_heliPilot setRank "CAPTAIN";
    	_grpHeli selectLeader _heliPilot;
    	heli = _heli;
    
    	_typeHeli = typeOf _heli;
    	_lz = []; 
    	_maxDist = 50; 
    	while { count _lz < 1 } do 
    		{ 
    			_lz = _posCaller findEmptyPosition [0 , _maxDist, _typeHeli]; 
    			_maxDist = _maxDist + 50; 
    		};
    
    	_targetPad = createVehicle ["Land_HelipadEmpty_F",[0,0,0], [], 0, "CAN_COLLIDE"];
    	_targetPad setPosATL _lz;
    	destLZ = getPosASLVisual _targetPad;
    	private _tPmark = createVehicle["sign_arrow_F",ASLtoATL destLZ,[],0,"CAN_COLLIDE"];
    	_heli doMove destLZ; //_lz;
    	_heli flyInHeightASL [200, 100, 400];
    
    	waituntil {(_heli distance2d _lz) <= 475};
    	vDVfinal = vectorDirVisual _heli vectorAdd (getPosASLVisual _heli vectorFromTo destLZ);
    	t1 = time - 3;
    	t2 = time + (2 * diag_fps);
    
    	private _idEF = addMissionEventHandler ["EachFrame",
    	{
    		if (!(alive heli) || !(canMove heli) || (getPosATLVisual heli select 2) <= 15 || (getPosASLVisual heli vectorDistance destLZ) < 5) then 
    		{
    			removeMissionEventHandler ["EachFrame", _thisEventHandler];
    			heli land "GET IN";
    			{heli animateDoor [_x,1]} forEach ['door_L','door_R'];
    			heli flyInHeight 0;
    		};
    
    		private _interval = linearConversion [t1, t2, time, 0, 1];
    		
    		heli setVelocityTransformation [
    			getPosASLVisual heli, 
    			destLZ, 
    			velocityModelSpace heli, 
    			[0,0,0], 
    			vectorDirVisual heli, 
    			vDVfinal, 		
    			vectorUpVisual heli, 
    			[0,0,1],
    			_interval
    		];
    	}];
    
    	[_heli,_lz] spawn 
    	{ 
    		params ["_heli", "_lz"]; 
    		waituntil { sleep 1; (_heli distance2d _lz) <= 200};
    		private _dir = _lz getDir _heli;
    		
    		while {(alive _heli && canMove _heli) && {(getPosATL _heli select 2) > 2 || isTouchingGround _heli}} do
    		{
    			0 setWindDir _dir;
    			sleep .5;
    		};
    	};
    };

     

     


  8. 15 minutes ago, madrussian said:

    How does one inhibit execution of WP statements?  (whilst not altering WP's condition or statement, or changing group's current WP index)

    Only way I can think of, without digging too deep, is "shoot him" before he reaches WP...  😁

    I really do not think there is a way without manipulating the current WP, I.E. setCurrentWaypoint, or changing the WPs already given.

    I don't quite understand what you are running along side the mission creators WPs themselves:

    21 minutes ago, madrussian said:

    In the system I'm creating, by design I'm not messing with WPs at all (aside from trying to stop group from continuing along WP positions or processing it's WP statements temporarily via lockWP or similar).  My code is designed to run alongside mission creators WPs.  I'm just looking for stronger way to "lock" these user created WPs, so my system is not affected by their WP statements.

     


  9. I believe it will only work if you've given multiple waypoints to begin with.

    You give AI multiple waypoints in script, then further in script, lockWP at one. 

    Adding waypoint "after" the lockWP may override.

    There are several topics on lockWP available in search.

     

    This one from @johnnyboy may help.

     

    If you want to inhibit the execution of the waypoint statements, just change out the condition to what you want to evaluate, or the statement itself.
    If you change the condition from the default "true", the waypoint will not complete if your condition does not evaluate to "true".

    If you want to leave condition to "true" so the waypoint will complete, evaluate what you want done in your statement.

    Or, I've missed exactly what your intent is.

     

    I tested lockWP in the editor, no mods except CBA loaded.  Works as expected.

    place yourself and another soldier not grouped to you in the editor.

    give the soldier one waypoint (close to you for testing).  In that waypoint under Waypoint: Expression >> On Activation: group this lockWP true;

    run the scenario, and aim your cursor at the soldier once he gets to waypoint

    hit esc and enter the following: group cursorTarget addWaypoint [position player, 0];      LOCAL EXEC

    Does he move?

    Point your cursor at the soldier again, and hit esc.

    Enter the following: group cursorTarget lockWp false;      LOCAL EXEC

    What happens?  He should move to your position.

    You can add several waypoints to that soldier around yourself.  Put lockWP true as noted above in each one.  Follow above procedure to only lockWP false at each.  He will not move to next waypoint until such command is given.


  10. Did anyone, even out of curiosity, try the code posted?  Of course parts of it can be ripped out (chat, etc) to test.

    I'm interested if anyone came up with better values.  I.E. instead of time, use diag_tickTime, or diag_frameNo.  Some formula of fps.

    Too much lag for use?

    Not worth the time?

    Does using this eliminate pilots in "hot" landing zone not wanting to land?

    Tried on other aircraft?  I was thinking planes landing at non-configured airports.  I used to use parts of Mando land for A2 landing on Nimitz.

     

    I have not been able to test all situations/formulas, but am interested in any input.

     


  11. I'm working on a proof of concept for a "fast/hot" helicopter landing using setVelocityTransformation.  Could be used for planes, etc.

    The version I'm currently testing is using time, as given on the wiki page for setVelocityTransformation.  I'm also working on a variation with distance to landing.

    My testing has shown helicopters will increase altitude ~ 600m out from landing point to bleed off velocity, prior to landing (of course depending on velocity prior).

    I start manipulating with setVelocityTransformation once they reach ~ 500m out.  This is more of a glide slope landing, than a high above, drop down now, approach.

    My problem is that EachFrame eventHandler (addMissionEventHandler) actually moves the heliopter back at first (away from), as if the "time" captured prior to eventHandler running is not lining up with current position.

    Any ideas on how to correct this?  May not be even possible with my approach.

    Set up (simplified):

    Spoiler

    Spawn helicopter/crew via BIS_fnc_spawnVehicle 3000m away from player position.

    create helipad at player positon

    helicopter doMove to helipad position

    500m out from landing run setVelocityTransformation in EachFrame eventhandler

    Once helicopter reaches < 15m above ground, break out of eventhandler

    helicopter land "GET IN"

    helicopter flyInHeight 0

     

    Of course there are other variables involved, such as utilizing time.  I've done tests with t1 = time, t2 = time + x(insert value here).  Used time + diag_fps, etc.

     

    Simplified version of the code used in an addAction:

    Spoiler
    
    private ["_gridPos", "_posCaller", "_spawnPos", "_spawnDir", "_spawnRange", "_vecDir", "_markerLZ", "_heliSpawn", "_heliPilot", "_typeHeli", "_lz", "_targetPad", "_maxDist"];
    
    params ["_tgt", "_caller", "_actIdx", "_args"];
    
    _tgt removeaction _actIdx;
    
    _gridPos = mapGridPosition getPos player;
    group player setGroupID ["Mako 30"];
    _posCaller = getPos player;
    _spawnDir = getDir player; // face the direction you want helicopter to arrive from
    _spawnRange = 3000;     // distance to spawn the helicopter from player location
    sleep 0.3;
    
    player sideChat format ["CROSSROAD this is Mako 30, requesting immediate extraction. Location is at grid %1, over.", _gridPos];
    
    sleep 5;
    [playerSide,"HQ"] sideChat "Mako 30 this is CROSSROAD, affirmative on the helicopter request.  Razor 04 will make contact when inbound, out.";
    
    /********************************************************************
    spawn helicopter
    ********************************************************************/
    _spawnPos = _posCaller getPos [_spawnRange, _spawnDir];
    _vecDir = _spawnPos getDir _posCaller;
    _markerLZ = getMarkerPos "marker_LZ";
    _heliSpawn = [];
    
    call {
    	if (playerSide isEqualTo west) exitWith {_heliSpawn = [_spawnPos, _vecDir, selectRandom ["B_Heli_Transport_01_F","B_Heli_Transport_03_F"], WEST] call BIS_fnc_spawnVehicle};
    	if (playerSide isEqualTo east) exitWith {_heliSpawn = [_spawnPos, _vecDir, selectRandom ["O_Heli_Light_02_F","O_Heli_Transport_04_covered_F"], EAST] call BIS_fnc_spawnVehicle};
    	if (playerSide isEqualTo resistance) exitWith {_heliSpawn = [_spawnPos, _vecDir, selectRandom ["I_Heli_light_03_F","I_Heli_Transport_02_F"], RESISTANCE] call BIS_fnc_spawnVehicle};
    	if (playerSide isEqualTo civilian) exitWith {_heliSpawn = [_spawnPos, _vecDir, selectRandom ["C_Heli_Light_01_civil_F","C_IDAP_Heli_Transport_02_F"], CIVILIAN] call BIS_fnc_spawnVehicle};
    };
    
    _heliSpawn params ["_heli", "_crewHeli", "_grpHeli"];
    _heliPilot = driver _heli;
    _grpHeli setGroupID ["Razor 04"];
    _heliPilot setskill 0.7;
    _heliPilot setCombatMode "YELLOW";
    _heliPilot setBehaviour "CARELESS";
    _heliPilot setRank "CAPTAIN";
    _grpHeli selectLeader _heliPilot;
    heli = _heli;
    sleep 1;
    
    _typeHeli = typeOf _heli;
    _lz = []; 
    _maxDist = 50; 
    while { count _lz < 1 } do 
    	{ 
    		_lz = _markerLZ findEmptyPosition [0 , _maxDist, _typeHeli]; 
    		_maxDist = _maxDist + 50; 
    	};
    
    _targetPad = createVehicle ["Land_HelipadEmpty_F",[0,0,0], [], 0, "CAN_COLLIDE"];
    _targetPad setPosATL _lz;
    destLZ = getPosASLVisual _targetPad;
    _heli doMove _lz;
    _heli flyInHeightASL [200, 100, 400];
    
    waitUntil {sleep .5; (_heli distance2d _lz) <= 600}; 
    _heliPilot sideChat "Mako 30 this is Razor 04, we are inbound to your position... Razor 04 Out";
    
    waituntil {(_heli distance2d _lz) <= 500};
    vDVfinal = vectorDirVisual _heli vectorAdd (getPosASLVisual _heli vectorFromTo destLZ);
    t1 = time;
    t2 = time + 60; //diag_fps; //90;
    
    private _idEF = addMissionEventHandler ["EachFrame",
    {
    	if (!(alive heli) || !(canMove heli) || (getPosATLVisual heli select 2) < 15 || (getPosASLVisual heli vectorDistance destLZ) < 5) then 
    	{
    		removeMissionEventHandler ["EachFrame", _thisEventHandler];
    		//Heli action ["LandGear", Heli];
    		heli land "GET IN";
    		//heli setVectorUp surfaceNormal position heli;
    		heli flyInHeight 0;
    	};	
    	
    	private _interval = linearConversion [t1, t2, time, 0, 1];
    	
    	heli setVelocityTransformation [
    		getPosASLVisual heli, 
    		destLZ, 
    		velocityModelSpace heli, 
    		[0,0,0], 
    		vectorDirVisual heli, 
    		vDVfinal, 		
    		vectorUpVisual heli, 
    		[0,0,1],
    		_interval
    	];
    }];
    
    [_heli,_lz] spawn 
    { 
    	params ["_heli", "_lz"]; 
    	waituntil { sleep 1; (_heli distance2d _lz) <= 200};
    	private _dir = _lz getDir _heli;
    	
    	while {(alive _heli && canMove _heli) && {(getPosATL _heli select 2) > 2 || isTouchingGround _heli}} do
    	{
    		0 setWindDir _dir;
    		sleep .5;
    	};
    };
    

     

     Any thoughts/comments would be appreciated.


  12. On 8/8/2021 at 7:09 PM, johnnyboy said:

    And now I have to figure out how to make heli do a fast landing (instead of rising way up, and slowly lowering down to land...vanilla AI....sigh).

    I've got another option for you @johnnyboy.  Making use of both setWindDir (AI land into the wind) and landing script I use in personal extraction scripts.  Makes use of vectorLinearConversion.

    Don't want to hijack @Rydygier topic, so let me know if you'd like to see. 

    Perhaps you could try out both, and let us know which works for you.  I may switch over to Rydygier's method if better (I have not tried myself)...

    • Like 1

  13. @z1_, first of all, the code you've been posting is SQS syntax, yet you have it in an SQF script?

    20 hours ago, z1_ said:

    this exec "scripts\searchlight.sqf";

    SQF should be execVM "whatever.sqf"  See SQS to SQF conversion.

     

    For a suggestion, you could try lookAt as utilized in this topic.

    Another option is the animationSources for the spotlight.  I had a specific post in mind, but unable to locate it at this time.

     

    Ok, I found the post I was thinking about, and I doubt it will help much with this spotlight.  Here's the post though, in case you need it for anything else...

     

    Another one you may give a try is by ALIAS on SW.  I've never tried it, but he may not even use a spotlight item, just create a light source.  Could be an option to look into these script(s).

    • Thanks 1

  14. another option:
     

    Spoiler
    
    
    _enemyUnits = ("true" configClasses (configfile >> "CfgGroups" >> "East" >> "OPF_F" >> "Infantry" >> "OIA_InfAssault") apply {getText (_x >> "vehicle")});
    
    //systemchat format["Unit type array: %1", _enemyUnits]; remove comment if you want
    
    _group = createGroup [east,true];
    
    _unit = _group createUnit [selectRandom _enemyUnits,getMarkerPos "Marker1",[],0,"CAN_COLLIDE"];

     

     

    • Like 2

  15. 1 hour ago, pierremgi said:

    Useless as far as you can copy paste what you want from config viewer cfgGroups.

    You're not allowed to modify part of any module from MGI advanced Modules.

    @pierremgi I'm not sure you understood what I asked.  I'm not looking to modify your Modules.

    It was a suggested request/improvement for you.  Save time for user.

    Side>>Faction>>(Infantry/Motorized/Mechanized/etc.)>>Group

    Pulled from config, instead of user verifying correct config and typing/copying.  Your module could provide the available options in drop downs.

     

    For instance, let me give you an example of some output from a script I was messing with:

    Spoiler
    
    [["CUP_O_TK",
    ["Motorized",["CUP_O_TK_MotorizedReconSection","CUP_O_TK_MotorizedPatrol"]],
    ["Mechanized",["CUP_O_TK_MechanizedInfantrySquadBMP2","CUP_O_TK_MechanizedInfantrySquadBTR60","CUP_O_TK_MechanizedSpecialSquad","CUP_O_TK_MechanizedReconSection","CUP_O_TK_MechanizedReconSectionAT"]],
    ["Armored",["CUP_O_TK_T72Platoon","CUP_O_TK_T55Platoon","CUP_O_TK_T34Platoon"]],["Air",["CUP_O_TK_Mi24_DFlight","CUP_O_TK_Mi_17Flight","CUP_O_TK_Su25Flight","CUP_O_TK_UH1HFlight"]],
    ["Infantry",["CUP_O_TK_InfantrySquad","CUP_O_TK_InfantrySection","CUP_O_TK_InfantrySectionAT","CUP_O_TK_InfantrySectionAA","CUP_O_TK_InfantrySectionMG","CUP_O_TK_SniperTeam","CUP_O_TK_SpecialPurposeSquad"]]],
    ["CUP_O_TK_MILITIA",
    ["Motorized",["CUP_O_TK_MILITIA_Technicals","CUP_O_TK_MILITIA_MotorizedGroup","CUP_O_TK_MILITIA_MotorizedPatrolBTR40"]],
    ["Infantry",["CUP_O_TK_MILITIA_Group","CUP_O_TK_MILITIA_Patrol","CUP_O_TK_MILITIA_AATeam","CUP_O_TK_MILITIA_ATTeam","CUP_O_TK_MILITIA_Demosquad"]]]]
    
    OR
    
    [["CUP_O_TK-Motorized",["CUP_O_TK_MotorizedReconSection","CUP_O_TK_MotorizedPatrol"]],
    ["CUP_O_TK-Mechanized",["CUP_O_TK_MechanizedInfantrySquadBMP2","CUP_O_TK_MechanizedInfantrySquadBTR60","CUP_O_TK_MechanizedSpecialSquad","CUP_O_TK_MechanizedReconSection","CUP_O_TK_MechanizedReconSectionAT"]],
    ["CUP_O_TK-Armored",["CUP_O_TK_T72Platoon","CUP_O_TK_T55Platoon","CUP_O_TK_T34Platoon"]],
    ["CUP_O_TK-Air",["CUP_O_TK_Mi24_DFlight","CUP_O_TK_Mi_17Flight","CUP_O_TK_Su25Flight","CUP_O_TK_UH1HFlight"]],
    ["CUP_O_TK-Infantry",["CUP_O_TK_InfantrySquad","CUP_O_TK_InfantrySection","CUP_O_TK_InfantrySectionAT","CUP_O_TK_InfantrySectionAA","CUP_O_TK_InfantrySectionMG","CUP_O_TK_SniperTeam","CUP_O_TK_SpecialPurposeSquad"]],
    ["CUP_O_TK_MILITIA-Motorized",["CUP_O_TK_MILITIA_Technicals","CUP_O_TK_MILITIA_MotorizedGroup","CUP_O_TK_MILITIA_MotorizedPatrolBTR40"]],
    ["CUP_O_TK_MILITIA-Infantry",["CUP_O_TK_MILITIA_Group","CUP_O_TK_MILITIA_Patrol","CUP_O_TK_MILITIA_AATeam","CUP_O_TK_MILITIA_ATTeam","CUP_O_TK_MILITIA_Demosquad"]]]

     

    Or, better yet, @gc8 has this type of info populated in one of his projects.  Should not be very difficult to implement.

    Just a suggestion, as I know each author has their own reasons for why they do things as they do.


  16. 4 hours ago, johnnyboy said:

    where if Player is hit he goes unconscious and an AI buddy will run to him and heal him.  While player is unconscious he can't command units any longer.  So if player commands units to go prone, then gets hit, the medic script tries to get unit to crouch (via setUnitPos "MIDDLE"), and run to player.  But in this case the unit is stuck in prone and crawls to player.  This sucks if medic is 100M away.

    Other option @johnnyboy, DON'T GET HIT.  😁

    May be other options with selectLeader, setLeader, etc., to move command away from player, then back quickly so your AI units don't blow everything.
    However, If you've been hit, you're cover is already probably blown...

     

    I really only use a homebrew mod of Psycho's medical.  I never noticed the same issue as you have, but should try it.
    I should also try @pierremgi medical, as he has some good stuff / well versed coder.

    • Like 1
×