Jump to content

Recommended Posts

   MGI HALO JUMP

 

 

Hi all,

Here is a little script to make an object as HALO JUMP base.

All AI group units with 100 m of the caller will perform the jump. Other players are not concerned.

 

Required: at least one object to add this HALO jump action.

 

parameters:   JUMP ALTITUDE  /  SAFETY ALTITUDE  /   THIS (object init field) / AI GROUP

 

example: 0 = [this,2000,90] execVM "MGI_HALO.sqf"     // in init field of a pole.

or simply: car1 execVM "MGI_HALO.sqf"  // 2000 ,90 and true are params by default.


MGI_HALO.sqf :

MGI_HALO = { 
params [["_pole",objNull,[objNull]],["_jump_alt",2000,[0]],["_jump_safety",90,[0]]];  
  
MGI_compHALO = compileFinal "  
  _plyr = _this;  
  MGI_fnc_orient = {  
    _obj = _this select 0;  
    _p = _this select 1;  
    _obj setVectorDirAndUp [  
      [ 0,cos _p,sin _p],  
      [[0,-sin _p,cos _p],0] call BIS_fnc_rotateVector2D  
    ]  
  };  
  _plyr setVariable ['bpk',unitBackpack _plyr];
  _plyr setVariable ['lockInv', _plyr addEventHandler ['InventoryOpened', {true}]];  
  if (backpack _plyr != '') then {  
    _whs = createVehicle ['WeaponHolderSimulated_Scripted',getpos _plyr vectorAdd [0,-2,1],[],0,'can_collide'];  
    _plyr action ['DropBag', _whs, typeOf (_plyr getVariable 'bpk')];  
    ['EHid','onEachFrame', {  
      params ['_plyr','_whs'];  
      if (backpack _plyr != 'B_parachute') then {  
        _plyr action ['dropBag', _whs, typeOf (_plyr getVariable 'bpk')];  
        _plyr action ['AddBag', _whs, 'B_Parachute']  
      };  
      call{  
        if (stance _plyr == 'UNDEFINED') exitWith {  
          _whs attachTo [_plyr,[-0.1,-0.05,-0.7],'leaning_axis'];  
          [_whs,-180]  call MGI_fnc_orient  
        };  
        if (stance _plyr != 'UNDEFINED') exitWith {  
          _whs  attachTo [_plyr,[-0.1,0.75,-0.05],'leaning_axis'];  
          [_whs,-90] call MGI_fnc_orient  
        };  
      };  
      if (isNil {_plyr getVariable ['bpk',nil]}) then {
        ['EHid', 'onEachFrame'] call BIS_fnc_removeStackedEventHandler  
      };  
    },[_plyr,_whs] ] call BIS_fnc_addStackedEventHandler  
  };  
";  
  
waitUntil {time >0 && count allPlayers >0 };  
_pole addAction ["<t color='#00ffff'>HALO jump for group (AI)</t>",{  
  params ["_target","_caller","_id","_parameters"];  
  openmap [true,false];  
  titleText["Select Map Position", "PLAIN"];  
  _parameters params ["_jump_alt","_jump_safety"]; 
   
  ["Jump","onMapSingleClick", {  
    0 cutText ["","black",0.01,true];  
    params ["","_pos","","","_jump_alt","_jump_safety","_MGI_forSquad"];  
    _caller = player;  
    _MGI_units =  (units _caller) select {local _x && alive _x &&  _x distanceSqr _caller < 100000 && isnull objectParent _x}; 
    {  
      [_x,_forEachIndex,_pos,_jump_alt,_jump_safety] spawn {  
        params ["_unit","_index","_pos","_jump_alt","_jump_safety"];  
        private ["_bpk","_bpktype","_whs","_para"];  
        if (isPlayer _unit) then {  
         _unit call MGI_compHALO;  
        };  
        uisleep 2;  
        _unit allowDamage false;  
        _unit setPos [(_pos select 0)-60 + random 30,(_pos select 1) -60 + random 30, (_jump_alt max 200) + (12 *_index)];  
        waitUntil {(getpos _unit select 2) > _jump_safety -50};  
        uisleep 0.2;  
        if (isPlayer _unit) then {  
          _bpk = _unit getVariable "bpk";  
          _bpktype = typeOf (_unit getVariable "bpk");  
          _whs = objectParent _bpk;  
          _unit addBackpackGlobal "B_parachute";  
        };  
        0 cutText ["","black in",1,true];  
        waitUntil {(getpos _unit select 2) < ([_jump_safety max 90,_jump_safety] select (isPlayer _unit)) +20 or  (!isnull objectParent player) };  
        if (!isplayer _unit) then {  
          uisleep 0.8;  
          _chute = createVehicle ["Steerable_Parachute_F", getpos _unit, [], 0, "can_collide"];  
          _unit moveInDriver _chute;  
        } else {  
          _unit allowDamage true;  
          if (!isTouchingGround _unit) then {  
          _unit action ["OpenParachute", _unit];  
          }  
        };  
        _para = objectParent _unit;  
        waitUntil {!isnull _para};  
        _para allowDamage false;  
        waitUntil {sleep 0.5; (isTouchingGround _unit && isNull _para) or surfaceIsWater (getpos _unit) or !alive _unit};  
        if (isPlayer _unit) then {  
          _unit setVariable ["bpk",nil];  
          waitUntil {isNull _para};  
          deleteVehicle _para;  
          sleep 0.5;
          if (!isNull _whs) then {
          	detach _whs;
          	_whs setPos (_unit modelToWorld [0,-2,1]);  
            _unit action ["AddBag",objectParent _bpk, _bpktype];  
            sleep 2;  
            deleteVehicle _whs;  
          };
          _unit removeEventHandler  ['inventoryOpened',_unit getVariable 'lockInv'];  
        } else {  
          uisleep 2;  
          _unit allowdamage true;  
        };  
      };  
    } forEach _MGI_units;  
    openmap [false,false];  
  
    false  
  },_parameters] call bis_fnc_addStackedEventHandler; 
 
  waitUntil {sleep 1; !visibleMap}; 
  ["Jump","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler; 
},[_jump_alt,_jump_safety], 5,false, true,"","vehicle _this == _this"];  
  
_pole addAction ["<t color='#00ffff'>HALO jump solo</t>",{  
  params ["_target","_caller","_id","_parameters"];  
  openmap [true,false];  
  titleText["Select Map Position", "PLAIN"];  
  _parameters params ["_jump_alt","_jump_safety"];  
  
  
  ["Jump","onMapSingleClick", {  
    0 cutText ["","black",0.01,true];  
    params ["","_pos","","","_jump_alt","_jump_safety","_MGI_forSquad"];  
    _caller = player;  
  
      [_caller,_pos,_jump_alt,_jump_safety] spawn {  
        params ["_unit","_pos","_jump_alt","_jump_safety"];  
        private ["_bpk","_bpktype","_whs","_para"];  
  
         _unit call MGI_compHALO;  
  
        uisleep 2;  
        _unit allowDamage false;  
        _unit setPos [_pos select 0,_pos select 1, (_jump_alt max 200)];  
        waitUntil {(getpos _unit select 2) > _jump_safety -50};  
        uisleep 0.2;  
          _bpk = _unit getVariable "bpk";  
          _bpktype = typeOf (_unit getVariable "bpk");  
          _whs = objectParent _bpk;  
          _unit addBackpackGlobal "B_parachute";  
        0 cutText ["","black in",1,true];  
        waitUntil {(getpos _unit select 2) < _jump_safety max 90 or  (!isnull objectParent player) };  
          _unit allowDamage true;  
          if (!isTouchingGround _unit) then {  
          _unit action ["OpenParachute", _unit];  
          };  
        _para = objectParent _unit;  
        waitUntil {!isnull _para};  
        _para allowDamage false;  
        waitUntil {sleep 0.5; (isTouchingGround _unit && isNull _para) or surfaceIsWater (getpos _unit) or !alive _unit};  
        if (isPlayer _unit) then {  
          _unit setVariable ["bpk",nil];  
          waitUntil {isNull _para};  
          deleteVehicle _para;  
          sleep 0.5;  
          if (!isNull _whs) then {
          	detach _whs;
          	_whs setPos (_unit modelToWorld [0,-2,1]);  
            _unit action ["AddBag",objectParent _bpk, _bpktype];  
            sleep 2;  
            deleteVehicle _whs;  
          };
          _unit removeEventHandler  ['inventoryOpened',_unit getVariable 'lockInv'];  
        } else {  
          uisleep 2;  
          _unit allowdamage true;  
        };  
      };  
  
    openmap [false,false];  
  
    false  
  },_parameters] call bis_fnc_addStackedEventHandler; 
   
  waitUntil {sleep 1; !visibleMap}; 
  ["Jump","onMapSingleClick"] call BIS_fnc_removeStackedEventHandler;  
},[_jump_alt,_jump_safety], 5,false, true,"","vehicle _this == _this"]; 
}; 
0 = [this,2000,90] spawn MGI_HALO

 

Now, you can choose in game if you HALO jump solo or in group (AI fellows within 100 meters).

 

EDITED : version nov 19th 2020

 

Have fun

 

 

 

  • Like 7
  • Thanks 2

Share this post


Link to post
Share on other sites

Sorry to be the dumb one, but it works for me but not for my AI squad....

 

Share this post


Link to post
Share on other sites
31 minutes ago, zagor64bz said:

Sorry to be the dumb one, but it works for me but not for my AI squad....

 

My bad! I copied/pasted an existing version of my scripts. I mentioned the param class haloJump in description.ext but you don't need it and it's useless in SP.

Corrected for Halo in group default!

Now, you need to add the haloJump mission parameter, if you want this option in MP, with 0 = in group, 1 = solo.

  • Like 1

Share this post


Link to post
Share on other sites

Sorry mate...still doesn't worrk.

 

Just to be safe here:

-in SP editor, put down a squad with me as TL.

-put down a flagpole with this in init:

0 = [2000,90,this] execVM "MGI_HALO.sqf"

in mission folder a file name: MGI_HALO.sqf with in

Spoiler

MGI_fnc_orient = {
  _obj = _this select 0;
  _p = _this select 1;
  _obj setVectorDirAndUp [
    [ 0,cos _p,sin _p],
    [[0,-sin _p,cos _p],0] call BIS_fnc_rotateVector2D
  ]
};

jump_alt = _this select 0;
jump_safety = _this select 1;
_pole = _this select 2;
MGI_forSquad = "haloJump" call BIS_fnc_getParamValue;   // if haloJump is an existing class params in description.ext. 0 if not.

waitUntil {time >0 && count allPlayers >0 };

_pole addAction ["<t color='#2222ff'>HALO jump</t>",{
  openmap [true,false];
  titleText["Select Map Position", "PLAIN"];
  MGI_units =  if (MGI_forSquad == 0) then [{(units player) select {local _x && _x distanceSqr player < 100000 && isnull objectParent _x}},{[player]}];
  {
    if (backpack _x !="") then {
      _x setVariable ["bpk",unitBackpack _x]
    } else {_x setVariable ["bpk",objNull]
    };
  } forEach MGI_units;

 {
  {
    _x spawn { _unit = _this;
    waitUntil {!isNull  (_unit getVariable "bpk")};
      _bpk =  (_unit getVariable "bpk");
      _unit setVariable ["id",name _unit];
      ["id"+(_unit getVariable "id"), "onEachFrame", {
        _unit = _this select 0;
        _bpk = objectParent (_this select 1);
          call{
            if (stance _unit == "UNDEFINED") exitWith {
              _bpk attachTo [_unit,[-0.1,-0.05,-0.7],'leaning_axis'];
              [_bpk,-180] remoteExec ["MGI_fnc_orient"]};
            if (stance _unit == "STAND") exitWith {
              _bpk  attachTo [_unit,[-0.1,0.75,-0.05],'leaning_axis'];
              [_bpk,-90] remoteExec ["MGI_fnc_orient"]};
          };

      },[_unit,_bpk]] call BIS_fnc_addStackedEventHandler;
    }
  } forEach MGI_units
} remoteExec ["call"];

   onMapSingleClick "
   0 cutText ['','black',0.01,true];
   {[_x,_forEachIndex,_pos] spawn {
    params ['_unit','_index','_pos'];
    sleep 2;
    _unit allowDamage false;
    _unit setPos [(_pos select 0)-40 + random 20,(_pos select 1) -40 + random 20, jump_alt+(12*_index)];
    waitUntil {(getpos _unit select 2) > jump_safety -50};
    sleep 0.2;
    _unit addBackpackGlobal 'B_parachute';
    _bpk = _unit getVariable 'bpk';
    _bpktype = typeOf (_unit getVariable 'bpk');
    0 cutText ['','black in',1,true];
    waitUntil {(getpos _unit select 2) < jump_safety +20};
    if ((getpos _unit select 2) > 10) then {
      _unit action ['OpenParachute', _unit];
    };
    waitUntil {sleep 0.5; ((getPosATL _unit select 2) < 6 && isNull objectParent _unit) or !alive _unit};
    _unit setVariable ['bpk',objNull];
    if (!isnil {_unit getVariable 'id'}) then {
      ['id'+(_unit getVariable 'id'),'onEachFrame'] call BIS_fnc_removeStackedEventHandler;
      _unit setVariable ['id',nil];
    };
    waitUntil {isNull objectParent _unit};
    if (isPlayer _unit) then {disableUserInput true};
    sleep 2;
    detach objectParent _bpk;
    _unit allowDamage true;
    if (!isNull objectParent _bpk) then {_unit action ['AddBag',objectParent _bpk, _bpktype]};
    sleep 2;
    if (isPlayer _unit) then {disableUserInput false;disableUserInput true;
disableUserInput false};
    };
   } forEach MGI_units;
  openmap [false,false];
  onMapSingleClick '';
  false"
  },nil, 5,false, true,"","vehicle _this == _this"];

 

 What is wrong with this picture?

 

EDIT: nevermind..got it working. Changed the line

MGI_units =  if (MGI_forSquad == 1) then [{(units player) select {local _x && _x distanceSqr player < 100000 && isnull objectParent _x}},{[player]}];

in

MGI_units =  if (MGI_forSquad == 0) then [{(units player) select {local _x && _x distanceSqr player < 100000 && isnull objectParent _x}},{[player]}];

 

Share this post


Link to post
Share on other sites

Corrected the bug when player re-click on map while jumping.

Share this post


Link to post
Share on other sites

OK the mapclick problem is solved. But there is still the graphic glitch that iam not able to test because i cant recreate it. it doesnt happend when iam testing but several testers in my mission reported it.

As they describe it, it looks like after the jump they are stuck waist down in ground and cannot move.

Share this post


Link to post
Share on other sites
6 hours ago, Mirek said:

OK the mapclick problem is solved. But there is still the graphic glitch that iam not able to test because i cant recreate it. it doesnt happend when iam testing but several testers in my mission reported it.

As they describe it, it looks like after the jump they are stuck waist down in ground and cannot move.

 

I failed to repeat this behavior. Anyway, I just re-wrote the script for more convenient MP flow. I abandoned the idea to display each ventral backpacks on every PC.

Now, only the local player can see that, if he has a backpack.

I have no people stuck on ground after jump. Perhaps, the new method (move in created parachute, instead of add parachute and open it) is more reliable.

For players, I let the manual opening. It's the better way to open lately and speed under enemy fires.

 

Just test this new script if you have time. I'd like feedback.

  • Thanks 1

Share this post


Link to post
Share on other sites

Works pretty well for me. This is cosmetic, but you might want to add a line to remove the map click message once it's been clicked: titleText["", "PLAIN"];   I put it right after the BIS_fnc_removeStackedEventHandler line and it worked.

Also, maybe change the color of the "HALO jump" action. While I like the color, it's really hard to read. I find reds and oranges are much easier to read against fluffy terrain, but that's just my opinion.

  • Like 1

Share this post


Link to post
Share on other sites
16 hours ago, pierremgi said:

 

I failed to repeat this behavior. Anyway, I just re-wrote the script for more convenient MP flow. I abandoned the idea to display each ventral backpacks on every PC.

Now, only the local player can see that, if he has a backpack.

I have no people stuck on ground after jump. Perhaps, the new method (move in created parachute, instead of add parachute and open it) is more reliable.

For players, I let the manual opening. It's the better way to open lately and speed under enemy fires.

 

Just test this new script if you have time. I'd like feedback.

Thanks i will try it as soon as i can.

 

Share this post


Link to post
Share on other sites

OK i tested it offline. I didnt get the time to upload the new version to the server yet. But so far, there is problem with back pack. After the jump the backpack lies on the ground, and the parachute is still on the players back, and the backpack cannot be picked up.   

 

Spoiler

r55F62sh7Lkm9Y5jz6edAo8P8ameH8W3-YiekYTO

I will Upload the mission today so hopefully we will have some online multiplayer feedback tomorow.

 

Tested again and found out that something fishy is going on with this script and first person wiev. : video from test

 

 

Share this post


Link to post
Share on other sites

Hi Mirek,

Thanks for your tests. It's rather unpredictable! I failed to reproduce that but I guess some weird behavior with parachute/backpack and disableUserInput command which already has some native troubles.

It's always difficult to make a real player have an action with cinematic, while he can strike any key. The engine tries to execute too many things at once. Formerly, I had to cope with the player who wants to fight at once in ground, "forgetting" his backpack even if this action is run. The reason why I disabled his inputs (strike key, move mouse) for a short time.

But, that's not the solution.

In my new script (above) I removed the disableUserInput feature and add a line to delete the parachute before taking the backpack. I had no problem so far. I hope this is convenient.

A little remaining problem is the fact you can take the backpack (in first person view) while jumping. If you do that, nothing occurs in cinematic but you can crash on ground because there is no more safety altitude. I will try to disable this weird possibility (take backpack while flying) when i have enough time.

Share this post


Link to post
Share on other sites

For last reported issue (possibility to shift parachute and backplack (then crash on ground) while in flight), you can just add somewhere, for each player:

 

inGameUISetEventHandler ["Action", " if (_this select 3 == 'takeItem' && !istouchingGround (_this select 1)) then {true}"];

 

init.sqf is OK or initPlayerLocal.sqf. I don't add this in the script, here, because each  inGameUISetEventHandler command overrides the previous one. This EH command is not stackable ! Feel free to add it or not along with your scenario and mods. Some preemptive mods love to change Arma default menu. Then, using this line can break compatibility with these bull mods.

Share this post


Link to post
Share on other sites

Hey @pierremgi I am having a little issue where I can only use the script / halo jump once. I have everything setup correctly but I go to flag pole, select halo jump and everything works as it should. After death and respawn I go to  flag pole again and choose halo and all my AI jump ( from what I can see on map )  but I get black screen saying "click on map" which has already happened and then black screen goes away and I am still standing in front of flagpole.

 

Any ideas? Cheers

 

Edit - The mission is hosted on a dedi server although I'm not sure if could cause the issue

Share this post


Link to post
Share on other sites
4 hours ago, Rockapes said:

Hey @pierremgi I am having a little issue where I can only use the script / halo jump once. I have everything setup correctly but I go to flag pole, select halo jump and everything works as it should. After death and respawn I go to  flag pole again and choose halo and all my AI jump ( from what I can see on map )  but I get black screen saying "click on map" which has already happened and then black screen goes away and I am still standing in front of flagpole.

 

Any ideas? Cheers

 

Edit - The mission is hosted on a dedi server although I'm not sure if could cause the issue

 

Wow! Thanks for this feedback. It seems you hit a point.. against BI functions. Roughly, the bis_fnc_addStackedEventHandler "onMapSingleClick" loose the player status after respawn for any hosted player.

I checked all my parameters, local player + units are still here and defined, all other params are fine.

At first jump, the local player is player so all the conditions with isPlayer are fine. You jump normally.

After respawn, the bunch of guys are still OK but if you count the player INSIDE the onmapsinngleclick, the result is 0, nuts, nada. (I repeat all units are here, yours also)

 

So, I found a workaround: disembark the player before this f..king stacked EH, and re embark it (as player) inside the EH.

Tell me if it's OK like this.

 

Share this post


Link to post
Share on other sites

Hey @pierremgi 

 

Just thought I would update you, AI aren't Halo jumping with that latest script on dedi server ( not alive ones anyways..lol. Did see some of my dead teammates fly past me free falling.. ). Haven't tried local host will try that out tomorrow.

 

Thanks again

Share this post


Link to post
Share on other sites
2 hours ago, Rockapes said:

Hey @pierremgi 

 

Just thought I would update you, AI aren't Halo jumping with that latest script on dedi server ( not alive ones anyways..lol. Did see some of my dead teammates fly past me free falling.. ). Haven't tried local host will try that out tomorrow.

 

Thanks again

 

OK, I just reworked this script with no more units passed in the onmapSingleClick, too unpredictable.

This brand new version is working on SP/MP hosted, even with respawned units. (tested)

So, if you test it on dedicated and experience some fails, try to remove all other mod/script with map click consequences or teleportation (HALO is for of all a teleport). Some mods can change or forbid this behavior.

Share this post


Link to post
Share on other sites

Hi @pierremgi Sorry to be a pain mate, I have added the following to a flag pole ( in the init field )

 

0 = [this,2000,90,true] execVM "MGI_HALO.sqf"   

 

When launching the mission I get an error about undefined variable   "this" on line 1 of MGI_Halo.

 

Can you tell me what I am doing wrong?

Share this post


Link to post
Share on other sites
5 hours ago, Rockapes said:

Hi @pierremgi Sorry to be a pain mate, I have added the following to a flag pole ( in the init field )

 

0 = [this,2000,90,true] execVM "MGI_HALO.sqf"   

 

When launching the mission I get an error about undefined variable   "this" on line 1 of MGI_Halo.

 

Can you tell me what I am doing wrong?

Thanks. My bad. This line had to be deleted (done). In fact, i'm not creating an sqf each time I test something. I use the same parameters in a spawned code.

[params here] execVM script.sqf is similar as [params here] spawn {same code as sqf} , just placed in a "true" trigger, or in an init field.

Share this post


Link to post
Share on other sites
5 hours ago, pierremgi said:

Thanks. My bad. This line had to be deleted (done). In fact, i'm not creating an sqf each time I test something. I use the same parameters in a spawned code.

[params here] execVM script.sqf is similar as [params here] spawn {same code as sqf} , just placed in a "true" trigger, or in an init field.

Sorry @pierremgi but now I am getting a couple of new errors

 

1. ] missing line 98

2. undefined variable _parameters line 102

 

Cheers

 

Share this post


Link to post
Share on other sites

Wrong copy/paste. I hope this is corrected now. I can't check that today.

Share this post


Link to post
Share on other sites

Works fine on hosted will try on dedi when I get up for work. Thanks for all your help and for all your scripts

Share this post


Link to post
Share on other sites

Sorry for late report, (Fatherhood is more timeconsuming than expected)

 

Script works fine on dedicated server. No Isues so far.

 

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Mirek said:

Fatherhood is more timeconsuming than expected

LOL..told ya brother....:f:

 

Share this post


Link to post
Share on other sites

Anyway to add a strobe or chem light to the player shoulder or helmet to see each other with NVG's and/or at night with a HALO jump?

 

Something like this from ATM_AirDrop

Spoiler

_target = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_caller removeAction _id;


_ltcolor = (_this select 3) select 0;

            _lgt = _ltcolor createVehicle [0,0,0];
            _lgt attachTo [_caller, [0,-0.03,0.07], "LeftShoulder"];
            _caller setvariable ["lgtarray", _lgt,true];


if (_ltcolor =="Chemlight_Red") then {
        RedOff = _caller addAction["<t color='#B40404'>Chemlight Red OFF</t>", "ATM_airdrop\atm_chem_off.sqf",[_ltcolor],6,false,false,"", "_target == ( player)"];
        _caller removeaction blueon;_caller removeaction yellowon;_caller removeaction greenon;_caller removeaction Iron;
        };
if (_ltcolor =="Chemlight_Blue") then {
        actionBlueOff = _caller addAction["<t color='#68ccf6'>Chemlight Blue OFF</t>", "ATM_airdrop\atm_chem_off.sqf",[_ltcolor],6,false,false,"","_target == ( player)"];
        _caller removeaction redon;_caller removeaction yellowon;_caller removeaction greenon;_caller removeaction Iron;
        };
if (_ltcolor =="Chemlight_Yellow") then {
        actionYellowOff = _caller addAction["<t color='#fcf018'>Chemlight Yellow OFF</t>", "ATM_airdrop\atm_chem_off.sqf",[_ltcolor],6,false,false,"", "_target == (player)"];
        _caller removeaction blueon;_caller removeaction redon;_caller removeaction greenon;_caller removeaction Iron;
        };
if (_ltcolor =="Chemlight_Green") then {
        actionGreenOff = _caller addAction["<t color='#30fd07'>Chemlight Green OFF</t>", "ATM_airdrop\atm_chem_off.sqf",[_ltcolor],6,false,false,"", "_target == ( player)"];
        _caller removeaction blueon;_caller removeaction yellowon;_caller removeaction redon;_caller removeaction Iron;
        };
if (_ltcolor =="NVG_TargetC") then {
        actionIROff = _caller addAction["<t color='#FF00CC'>Strobe IR OFF</t>", "ATM_airdrop\atm_chem_off.sqf",[_ltcolor],6,false,false,"", "_target == ( player)"];
        _caller removeaction blueon;_caller removeaction yellowon;_caller removeaction redon;_caller removeaction greenon;
        };

		while {(getPos _caller select 2) > 2} do {

	if(getPos _caller select 2 < 3) then{
if (_ltcolor =="Chemlight_Red") then {
        _caller removeaction RedOff;
        };
if (_ltcolor =="Chemlight_Blue") then {
        _caller removeaction actionBlueOff;
        };
if (_ltcolor =="Chemlight_Yellow") then {
        _caller removeaction actionYellowOff;
        };
if (_ltcolor =="Chemlight_Green") then {
        _caller removeaction actionGreenOff;
        };
if (_ltcolor =="NVG_TargetC") then {
        _caller removeaction Iron;
        };
	}
	};

 

Thanks,

Reed

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

×