Jump to content
Sign in to follow this  
fer

F2 Mission Development Framework (BAS f for ArmA 2)

Recommended Posts

Hey there :)

For some reason I can't get the 'select reinforcement option' dialogue to go away.

I've disabled what I think are the right lines in the description but I keep getting it in the action menu and I don't want it for this particular mission.

What am I doing wrong?

Cheers

Share this post


Link to post
Share on other sites

@droogs .. perhaps next time put it in a spoiler code so I dont wear out my middle mouse button scrolling down !

Share this post


Link to post
Share on other sites

@ droogs: In your code block that begins "// EQUIPMENT: UKF" you define the local variable "_LMG", but later in the script, in the block that begins "// LOADOUT: LMG", you mix up the local variables "_MG" and "_LMG". Make sure you are consistent between the definitions block and the block that actually adds equipment.

@ BangTail: If you're using F2 out of the box, the only time you should encounter the "Select reinforcement options" command is when you take one of the pre-placed RESERVED FOR JIP slot. Assuming you're using those slots, but want to ditch the command, just remove the following line from their INITs:

nul = [this] execVM "f\common\f_JIP_addReinforcementOptionsAction.sqf";

Hope those tips help, comrades!

Share this post


Link to post
Share on other sites
@ droogs: In your code block that begins "// EQUIPMENT: UKF" you define the local variable "_LMG", but later in the script, in the block that begins "// LOADOUT: LMG", you mix up the local variables "_MG" and "_LMG". Make sure you are consistent between the definitions block and the block that actually adds equipment.

@ BangTail: If you're using F2 out of the box, the only time you should encounter the "Select reinforcement options" command is when you take one of the pre-placed RESERVED FOR JIP slot. Assuming you're using those slots, but want to ditch the command, just remove the following line from their INITs:

nul = [this] execVM "f\common\f_JIP_addReinforcementOptionsAction.sqf";

Hope those tips help, comrades!

This is not present in their INIT's mate :(

Edited by BangTail

Share this post


Link to post
Share on other sites

@Fer Thank you, your help very much appreciated

@Kremator My appolgies dude will know better next time

Share this post


Link to post
Share on other sites
This is not present in their INIT's mate :(

I've just opened up a fresh copy of F2, and all JIP slots have the following INITs:

GrpUN_JIP = group this; nul = [this] execVM "f\common\f_JIP_addReinforcementOptionsAction.sqf";

NB GrpUN_JIP would be GrpTK_JIP for UN and Takistani Army slots respectively.

Assuming a vanilla installation of F2, the only situation in which you should be getting the select reinforcement options menu is if this command is executed via a unit's INIT.

Have you added this command anywhere else, such as in the mission init.sqf file?

Share this post


Link to post
Share on other sites
I've just opened up a fresh copy of F2, and all JIP slots have the following INITs:

GrpUN_JIP = group this; nul = [this] execVM "f\common\f_JIP_addReinforcementOptionsAction.sqf";

NB GrpUN_JIP would be GrpTK_JIP for UN and Takistani Army slots respectively.

Assuming a vanilla installation of F2, the only situation in which you should be getting the select reinforcement options menu is if this command is executed via a unit's INIT.

Have you added this command anywhere else, such as in the mission init.sqf file?

No bud and I never remember having this problem up until recently.

I'm using VTE units anyway so they definitely shouldn't be affected.

Share this post


Link to post
Share on other sites

@ BangTail - Really hard to diagnose then, because in theory this should even come up with units you have placed in addition to the pre-placed ones. I'd offer to look at your mission in the editor for you, but I suspect I won't have the necessary addons (folk is all about vanilla). However, I still can try and have a look using a text editor if you post your mission folder as an archive (or send me a PM with a link to download).

Share this post


Link to post
Share on other sites
@ BangTail - Really hard to diagnose then, because in theory this should even come up with units you have placed in addition to the pre-placed ones. I'd offer to look at your mission in the editor for you, but I suspect I won't have the necessary addons (folk is all about vanilla). However, I still can try and have a look using a text editor if you post your mission folder as an archive (or send me a PM with a link to download).

I appreciate that, I'll try to post it somewhere tonight :D

Share this post


Link to post
Share on other sites

Hi all,

First Bravo for you script, it's really usefull.

But can you explain a little more about the group marker?

I edit a mission with CDF squad. I create Three squad of six men and one command squad of four men

In the init of the unit I had:

GrpCDF_Charlie = group this;
and for the command squad
GrpCDF_CO = group this;

I edit the "folk_setGroupIDs":

GrpCDF_CO setGroupId ["CDF Army CO -","GroupColor0"];
GrpCDF_DC setGroupId ["CDF Army DC -","GroupColor0"];
GrpCDF_Alpha setGroupId ["CDF Army Alpha FT -","GroupColor0"];
GrpCDF_Bravo setGroupId ["CDF Army Bravo FT -","GroupColor0"];
GrpCDF_Charlie setGroupId ["CDF Army Charlie FT -","GroupColor0"];
GrpCDF_Delta setGroupId ["CDF Army Delta FT -","GroupColor0"];
GrpCDF_Echo setGroupId ["CDF Army Echo FT -","GroupColor0"];
GrpCDF_Fox setGroupId ["CDF Army Fox FT -","GroupColor0"];
GrpCDF_MMG1 setGroupId ["CDF Army MMG1 -","GroupColor0"];
GrpCDF_MAT1 setGroupId ["CDF Army MAT1 -","GroupColor0"];
GrpCDF_ST1 setGroupId ["CDF Army ST1 -","GroupColor0"];

But I don't see any group marker, only the fireteam marker.

Do I forget something ?

Aze

Share this post


Link to post
Share on other sites

Aze, please can you let me know which build and version of F2 you used?

The file that initiates the group markers is:

f\common\folk_setLocalGroupMarkers.sqf

Have a look in there, and you'll see that this file initiate the markers by faction. If you have added CDF units to the build "F2 OA Folk" then by default no markers are initiated for the CDF faction. This might be the issue.

Share this post


Link to post
Share on other sites

I've been using the assigngear script in some multiplayer co-op missions. I've noticed that the script does not seem to change the loadouts of AI units on a dedicated server. Is there any known workaround for this?

Share this post


Link to post
Share on other sites

Yes:

1. Instead of execVM, use call compile preprocessFile

2. Remove any sleep or waitUntil commands from the script. With this solution they are no longer needed and in fact will actually break it.

3. Add if (!isServer) exitWith {}; at the start of the script.

Note #1: This will only work in missions that don't have playable units appear during the mission. That is, either respawn=NONE, respawn=BIRD, or if you use other forms of respawn such as group/side/base/instant you must keep all AI enabled, though again not much point in this script for a respawn-based mission. Just be aware that with group (and probably side) respawn, if you disable AI at the start (or have disabledAI=1 in description.ext) you will most likely have trouble with JIP, and there's actually no decent workaround for that since init lines seem to not get executed reliably for units created during the mission anyway.

Note #2: ACE rucks will not work with this, unless ACE changed something in how they work since the last time I messed with this (which was a long while ago).

Note #3: You now will also be able to see your gear in the briefing screen before the mission starts.

Note #4: Sometimes (in fact, quite rarely, but it happens) players who JIP into an existing AI unit would get their gear reset. The suggested solution resolves this issue as well.

Edited by galzohar

Share this post


Link to post
Share on other sites

That's excellent, thanks for the suggestions galzohar. I use group respawn but usually leave AI on, so it shouldn't be a problem.

Share this post


Link to post
Share on other sites
I've been using the assigngear script in some multiplayer co-op missions. I've noticed that the script does not seem to change the loadouts of AI units on a dedicated server. Is there any known workaround for this?

fatty86, I've just been testing on a dedicated server and cannot reproduce this issue. Are you certain this is a script issue? Can you post a sample mission folder?

Share this post


Link to post
Share on other sites

This issue is old and as said earlier in this thread not easy to reproduce, as it depends on a lot of varying factors and the fact the game isn't very stable when it comes to how it transfers locality around between machines when locality needs to change.

My solution removes any locality issues since the script will run on the server while all units are still local to the server (no players can even finish loading the mission when server initialization is running, NOT including init.sqf since it is execVMed).

Share this post


Link to post
Share on other sites

Fer, to be truthful the missions are sort of an amalgam of bits and pieces of all different scripts, and I've made some additional modifications to assigngear.sqf. So I was wondering if perhaps my own hack-job had caused something to go awry. If no one else is experiencing the same thing and you can't reproduce it, then I wouldn't worry too much. But if other folks come forward with the same problem, I can try to piece something together.

Share this post


Link to post
Share on other sites

@fatty86 - Okay; I've been using this script without incident for 18-24 months, first at Shack Tactical (with playercounts of 60+), and latterly at Folk, and not run into the issue you highlighted. That said ...

@galzohar - You're right, there is a better way to implement the loadout changes such that it happens prior to briefings; the assignGear script was originally written by kevb0 from Shack Tactical, and I hear he has evolved it to solve that particular issue. Thanks for sharing your own workaround.

:)

Share this post


Link to post
Share on other sites

On Zeus we've noticed issues with this script several times. A bunch of theories for what is causing the issues were raised (all related to locality), but nothing was actually proven, and eventually the solution was what I mentioned here which works flawlessly 100% (within the limitations described above, which the original script also has, and in fact the original script has some more limitations on top).

Edited other post with:

Note #4: Sometimes (in fact, quite rarely, but it happens) players who JIP into an existing AI unit would get their gear reset. The suggested solution resolves this issue as well

Share this post


Link to post
Share on other sites

Hi,

I have a problem with the loadout since the last Arma2 patch and last ACE:

When my teamleader has a rucksac all the subunit of the group with rucksac too have the same loadout as the team leader in their rucksac (only rucksac affected).

Share this post


Link to post
Share on other sites
Hi,

I have a problem with the loadout since the last Arma2 patch and last ACE:

When my teamleader has a rucksac all the subunit of the group with rucksac too have the same loadout as the team leader in their rucksac (only rucksac affected).

Cool=Azroul13, which build of F2 are you using?

Share this post


Link to post
Share on other sites
Cool=Azroul13, which build of F2 are you using?

I used a simplified script of your loadout script(but all the main script are from F2 OA):

// F2A2 - ShackTactical Assign Gear Script
// Credits: Please see the F2 online manual (http://www.ferstaberinde.com/f2/en/)
// ====================================================================================

// DECLARE VARIABLES AND FUNCTIONS

private [
"_faction","_rifle","_riflecrew","_rifleGL","_MG","_pistol","_riflemag","_riflemagtracer",
"_GLMag","_MGmag","_grenade","_at","_atmag",
"_smokewhite","_smokegreen","_smokered","_smokeyellow","_smokegrenadewhite","_smokegrenadeyellow",
"_pistol","_pistolmag",
"_snrifle","_snmag","_sprifle","_spmag","_mediumMG","_mediumMGmag", "_heavyMG", "_heavyMGtripod", "_heavyMGmag",
"_mediumAT","_mediumATmag1","_mediumATmag2","_heavyAT","_heavyATmag1","_heavyATmag2","_rucksack","_medicrucksack", "_Atrucksack",
"_bandage", "_morphine", "_epinephrine",
"_ruckmags","_ruckweapons",
"_bandage","_morphine","_epinephrine",
"_radiolong","_laserbat"];

// ====================================================================================

// ERROR CHECKING
// If the script has been called without both required paramaters being passed, it 
// exits immediately.

sleep .1;

if (isNull (_this select 1)) exitwith {};
if (!local (_this select 1)) exitwith {};

// ====================================================================================

// GET UNIT FACTION
// The second variable passed to the script identifies the unit, from which we can
// then get the faction. More error checking is included here.

_typeofUnit = toLower (_this select 0);
_unit = _this select 1;
//_faction = toLower (faction _unit);

//if (isnil ("_faction")) then {call compile format ["_faction = '%1'",(faction _unit)];};
//_faction =  tolower _faction;
//if (!(_faction == "ru") and !(_faction == "usmc") and !(_faction == "gue") and !(_faction == "ins") and !(_faction == "cdf")) exitwith {player globalchat format ["DEBUG (f\common\@ShackTac_assignGear.sqf): Unit %1 faction %2 is not correct. Make sure the script is initialized correctly.",_unit,_faction];};

// ====================================================================================

// DEFINE GLOBAL EQUIPMENT
// The following blocks of code define equipment that is universal (medical equipment)

//_bandage = "ACE_Bandage";
//_morphine = "ACE_Morphine";
//_epinephrine = "ACE_Epinephrine";

// ====================================================================================

// DEFINE FACTION EQUIPMENT
// The following blocks of code define the equipment for each faction.

//switch (_faction) do
//{

// ====================================================================================

// EQUIPMENT: USMC
// The block of code below identifies equipment for the USMC faction.

//   case "usmc":
//   {
  _rifle = "ACE_AK74M";
  _riflecrew = "ACE_AKS74P";
  _rifleGL = "ACE_AK74M_GL";
  _commandrifle = "ACE_AK74M_1P29";
  _MG = "ACE_RPK74M";
  _riflemag = "30Rnd_545x39_AK";
  _riflemagtracer = "ACE_30Rnd_545x39_T_AK";
  _GLmag = "1Rnd_HE_GP25";
  _MGmag = "ACE_45Rnd_545x39_B_AK";
  _grenade = "HandGrenade_East";
  _at = "ACE_RPG27";
  _atmag = "ACE_RPG27";

  _snrifle = "SVD";
  _snmag = "10Rnd_762x54_SVD";
  _sprifle = "ACE_AK74M_GL_PSO";
  _spmag = "30Rnd_545x39_AK";

//   _mediumMG = "Pecheneg";
//   _mediumMGmag = "100Rnd_762x54_PK";

//   _heavyMG = "ACE_DSHKMProxy";
//   _heavyMGtripod = "ACE_DSHKMTripodProxy";
//   _heavyMGmag = "50Rnd_127x107_DSHKM";

//   _mediumAT = "ACE_RPG29";
//   _mediumATmag1 = "ACE_RPG29_PG29";
//   _mediumATmag2 = "ACE_RPG29_TBG29";

//   _heavyAT = "MetisLauncher";
//   _heavyATmag1 = "AT13";
//   _heavyATmag2 = "AT13";

  _smokewhite = "1Rnd_SMOKE_GP25";
  _smokegreen = "1Rnd_SmokeGreen_GP25";
  _smokered = "1Rnd_SmokeRed_GP25";
  _smokeyellow = "1Rnd_SmokeYellow_GP25";
  _smokegrenadewhite = "SmokeShell";
  _smokegrenadeyellow = "SmokeShellYellow";


  _pistol = "Makarov";
  _pistolmag = "8Rnd_9x18_Makarov";

  _rucksack = "ACE_ALICE_Backpack";
  _medicrucksack = "ACE_Rucksack_EAST_Medic";
  _Atrucksack = "TK_RPG_Backpack_EP1";

  _bandage = "ACE_Bandage";
  _morphine = "ACE_Morphine";
  _epinephrine = "ACE_Epinephrine";

  _radiolong = "ACE_ANPRC77";

  _laserbat = "ACE_Battery_Rangefinder";

_m240 = "Pk";
_m240Mags = "100Rnd_762x54_PK";

_SMAWLauncher = "ACE_RPG7V_PGO7";
_SMAWHEAA = "ACE_PG7VM_PGO7";
_SMAWHEDP = "ACE_TBG7V_PGO7";

_Javelin = "MetisLauncher";
_JavelinAmmo = "AT13";

//   };

// ====================================================================================

// DEFINE UNIT TYPE LOADOUTS
// The following blocks of code define loadouts for each type of unit (the unit type
// is passed to the script in the first variable).

switch (_typeofUnit) do
{

// ====================================================================================
// ====================================================================================
// ====================================================================================

// LOADOUT:- 
//  Groupe HQ
//  Lieutenant

  case "com":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
     removeallweapons _unit;
removeAllItems this;
// Primary:
     {_unit addmagazine _riflemag} foreach [1,2,3,4,5];
     {_unit addmagazine _riflemagtracer} foreach [1];
     {_unit addmagazine _grenade} foreach [1,2];      
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];
     _unit addweapon _rifle;
     _unit addweapon _rucksack;
// Secondary:
     {_unit addmagazine _bandage} foreach [1,2,3];
     {_unit addmagazine _morphine} foreach [1,2];
     {_unit addmagazine _epinephrine;} foreach [1,2];            
// Kit:
     _unit addweapon "NVGoggles";
     _unit addWeapon "ItemMap";
     _unit addWeapon "ACE_Map_Tools";   
     _unit addweapon "Binocular";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";
// Radio backpack: 
     [_unit,"30Rnd_545x39_AK",4] spawn f_addMagToRuck;           
     [_unit,"ACE_Bandage",2] spawn f_addMagToRuck;
     [_unit,"ACE_Morphine",1] spawn f_addMagToRuck;

     _unit selectweapon primaryweapon _unit;
  };

// ====================================================================================

// LOADOUT:-
//  Groupe HQ
//  Radio

  case "rad":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
     removeallweapons _unit;
// Primary:
     {_unit addmagazine _riflemag} foreach [1,2,3,4,5,6];
     {_unit addmagazine _riflemagtracer} foreach [1];
     {_unit addmagazine _grenade} foreach [1];      
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];
     _unit addweapon _rifle;
     _unit addweapon _radiolong;
// Secondary:
     {_unit addmagazine _bandage} foreach [1];
     {_unit addmagazine _morphine} foreach [1];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addWeapon "ItemMap";
     _unit addWeapon "ACE_Map_Tools";
     _unit addweapon "ItemGPS";
     _unit addweapon "ItemCompass";
     _unit addWeapon "Binocular";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";
     _unit addWeapon "ace_arty_rangeTable_m224_legacy";
// Radio backpack:


     [_unit,"SmokeShellYellow",2] spawn f_addMagToRuck;
     [_unit,"ACE_Bandage",1] spawn f_addMagToRuck;


     _unit selectweapon primaryweapon _unit;
  };

// ====================================================================================

// LOADOUT:-
//  Group HQ
//  Tireur d'elite

  case "te":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;

// Primary:
     {_unit addmagazine _snmag} foreach [1,2,3,4,5];
     {_unit addmagazine _grenade} foreach [1,2];      
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];
     _unit addweapon _snrifle;
     _unit addweapon _rucksack;
// Secondary:
     {_unit addmagazine _pistolmag;} foreach [1,2,3,4,5];
_unit addweapon _pistol;
// Kit:
     _unit addweapon "NVGoggles";
     _unit addWeapon "ItemMap";   
     _unit addweapon "Binocular";
     _unit addweapon "ItemCompass";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";
// Radio backpack:
     [_unit,"ACE_30Rnd_556x45_T_Stanag",3] spawn f_addMagToRuck;                      
     [_unit,"SmokeShellYellow",2] spawn f_addMagToRuck;     
     [_unit,"ACE_Bandage",2] spawn f_addMagToRuck;
     [_unit,"ACE_Morphine",2] spawn f_addMagToRuck;

      _unit selectweapon primaryweapon _unit;
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";

  };

// ====================================================================================

// LOADOUT:-
//  Groupe de combat
//  Sergent

  case "sgt":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
// Primary:
     {_unit addmagazine _riflemag} foreach [1,2,3,4,5,6];
     {_unit addmagazine _riflemagtracer} foreach [1];
     {_unit addmagazine _grenade} foreach [1,2];      
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];      
     _unit addweapon _rifleGL;
     _unit addweapon _rucksack;
// Secondary:     
     {_unit addmagazine _GLmag} foreach [1,2,3,4,5,6];
     {_unit addmagazine _smokered} foreach [1];
// Kit:
     _unit addweapon "NVGoggles"; 
     _unit addWeapon "ACE_Map_Tools";  
     _unit addweapon "Binocular";
     _unit addWeapon "ItemMap";
     _unit addweapon "ItemCompass";
     _unit addweapon "ItemRadio";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";
// Backpack:
     [_unit,"ACE_30Rnd_545x39_T_AK",1] spawn f_addMagToRuck;
     [_unit,"30Rnd_545x39_AK",4] spawn f_addMagToRuck;                  
     [_unit,"HandGrenade_East",2] spawn f_addMagToRuck;      
     [_unit,"1Rnd_SmokeRed_GP25",2] spawn f_addMagToRuck;      
     [_unit,"ACE_Bandage",2] spawn f_addMagToRuck;
     [_unit,"ACE_Morphine",2] spawn f_addMagToRuck;
     [_unit,_GLmag,5] spawn f_addMagToRuck;

     _unit selectweapon primaryweapon _unit;
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";
  };

// ====================================================================================

// LOADOUT:-
//   Groupe de combat 
//   Caporal

  case "cpl":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
// Primary:
     {_unit addmagazine _riflemag} foreach [1,2,3,4,5,6];
     {_unit addmagazine _riflemagtracer} foreach [1];      
     {_unit addmagazine _grenade} foreach [1,2];      
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];
     _unit addweapon _snrifle; 
     _success = [_unit, "SVD"] call ACE_fnc_PutWeaponOnBack;     
     _unit addweapon _rifle;
     _unit addweapon _medicrucksack;
// Secondary:
     {_unit addmagazine _bandage;} foreach [1,2,3];
     {_unit addmagazine _morphine;} foreach [1,2];
     {_unit addmagazine _epinephrine;} foreach [1,2,3];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addWeapon "ItemMap";  
     _unit addweapon "Binocular";
     _unit addweapon "ItemCompass";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";            


// Backpack:
     [_unit,"10Rnd_762x54_SVD",3] spawn f_addMagToRuck;
     [_unit,"30Rnd_545x39_AK",4] spawn f_addMagToRuck;                     
     [_unit,"ACE_Bandage",4] spawn f_addMagToRuck;
     [_unit,"ACE_Morphine",3] spawn f_addMagToRuck;

     _unit selectweapon primaryweapon _unit;
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";
  };

// ====================================================================================

// LOADOUT:-
//   Groupe de combat 
//   Caporal

  case "senior":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
// Primary:
     {_unit addmagazine _riflemag} foreach [1,2,3,4,5,6];
     {_unit addmagazine _riflemagtracer} foreach [1];      
     {_unit addmagazine _grenade} foreach [1,2];      
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];     
     _unit addweapon _rifle;
     _unit addweapon _medicrucksack;
// Secondary:
     {_unit addmagazine _bandage;} foreach [1,2,3];
     {_unit addmagazine _morphine;} foreach [1,2];
     {_unit addmagazine _epinephrine;} foreach [1,2,3];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addWeapon "ItemMap";  
     _unit addweapon "Binocular";
     _unit addweapon "ItemCompass";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";            


// Backpack:
     [_unit,"30Rnd_545x39_AK",4] spawn f_addMagToRuck;                     
     [_unit,"ACE_Bandage",4] spawn f_addMagToRuck;
     [_unit,"ACE_Morphine",3] spawn f_addMagToRuck;
     [_unit,"ACE_epinephrine",3] spawn f_addMagToRuck;

     _unit selectweapon primaryweapon _unit;
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";
  };
// ====================================================================================

// LOADOUT:-
//   Groupe de combat
//   Fusilier RPG

  case "rpg":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
      removeallitems _unit;
// Primary:
     {_unit addmagazine _riflemag} foreach [1,2,3,4,5,6,7];
     {_unit addmagazine _riflemagtracer} foreach [1];
     {_unit addmagazine _grenade} foreach [1];      
     {_unit addmagazine _smokegrenadewhite} foreach [1];
     _unit addweapon _rifle;
     _unit addBackpack _rucksack;
     [_unit,"ACE_PG7VM_PGO7",2] spawn f_addMagToRuck;      
     [_unit,"ACE_TBG7V_PGO7",1] spawn f_addMagToRuck;
     [_unit,"ACE_Bandage",2] spawn f_addMagToRuck;
     _success = [_unit, "ACE_ALICE_Backpack"] call ACE_fnc_PutWeaponOnBack;          
     _unit addweapon _SMAWLauncher;


// Secondary:
     {_unit addmagazine _bandage;} foreach [1,2,3];
     {_unit addmagazine _morphine;} foreach [1,2];
     {_unit addmagazine _epinephrine;} foreach [1];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addWeapon "ItemMap";
     _unit addweapon "Binocular";
     _unit addweapon "ItemCompass";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";
// Medical backpack:



     _unit selectweapon primaryweapon _unit;
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";
  };

// ====================================================================================

// LOADOUT:-
//   Groupe de combat
//   Assistant Fusilier RPG

  case "assrpg":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
      removeallitems _unit;
// Primary:
     {_unit addmagazine _riflemag} foreach [1,2,3,4,5,6];
     {_unit addmagazine _riflemagtracer} foreach [1];
     {_unit addmagazine _grenade} foreach [1,2];      
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];
     _unit addweapon _rifle;
     _unit addBackpack _rucksack;
// Secondary:
     {_unit addmagazine _bandage;} foreach [1,2,3];
     {_unit addmagazine _morphine;} foreach [1];
     {_unit addmagazine _epinephrine;} foreach [1];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addWeapon "ItemMap";   
     _unit addweapon "Binocular";
     _unit addweapon "ItemCompass";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";
// Radio backpack:                  
     [_unit,"ACE_PG7VM_PGO7",2] spawn f_addMagToRuck;      
     [_unit,"ACE_TBG7V_PGO7",1] spawn f_addMagToRuck;
     [_unit,"ACE_Bandage",2] spawn f_addMagToRuck;



     _unit selectweapon primaryweapon _unit;
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";      
     };


// ====================================================================================

// LOADOUT:-
//   Groupe de combat
//   Fusilier FM

  case "fm":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
// Primary:
     {_unit addmagazine _MGmag} foreach [1,2,3,4,5,6,7,8];
     {_unit addmagazine _grenade} foreach [1,2];  
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];          
     _unit addweapon _MG;      
// Secondary:
     {_unit addmagazine _bandage;} foreach [1,2,3];
     {_unit addmagazine _morphine;} foreach [1,2];
     {_unit addmagazine _epinephrine;} foreach [1];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addWeapon "ItemMap";
     _unit addweapon "ItemCompass";
     _unit addweapon "Binocular";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";

     _unit selectweapon primaryweapon _unit;  
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";    
     };

// ====================================================================================

// LOADOUT:-
//   Groupe de combat
//   Assistant Fusilier FM

  case "assfm":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
// Primary:
     {_unit addmagazine _MGmag} foreach [1,2,3,4,5,6,7];  
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];           
     {_unit addmagazine _grenade} foreach [1]; 
     _unit addweapon _MG;
     _unit addweapon _rucksack;
// Secondary:
     {_unit addmagazine _bandage;} foreach [1,2,3];
     {_unit addmagazine _morphine;} foreach [1,2];
     {_unit addmagazine _epinephrine;} foreach [1];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addweapon "Binocular";
     _unit addWeapon "ItemMap";
     _unit addweapon "ItemGPS";
     _unit addweapon "ItemCompass";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";
// backpack:
     [_unit,"ACE_PG7VM_PGO7",2] spawn f_addMagToRuck;      
     [_unit,"ACE_TBG7V_PGO7",1] spawn f_addMagToRuck;
     [_unit,"ACE_Bandage",2] spawn f_addMagToRuck;




     _unit selectweapon primaryweapon _unit;      
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";
     };

// ====================================================================================

// LOADOUT:-
//   Groupe de combat
//   Fusilier MG

  case "mg":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
// Primary:
     {_unit addmagazine _m240Mags} foreach [1,2,3];
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];                
     _unit addweapon _m240;

// Secondary:
     {_unit addmagazine _bandage;} foreach [1];
     {_unit addmagazine _morphine;} foreach [1];
     {_unit addmagazine _epinephrine;} foreach [1];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addWeapon "ItemMap";
     _unit addweapon "Binocular";
     _unit addweapon "ItemGPS";
     _unit addweapon "ItemCompass";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";


     _unit selectweapon primaryweapon _unit;    
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";  
     };

// ====================================================================================

// ====================================================================================

// LOADOUT:-
//   Groupe de combat
//   Assistant Fusilier MG

  case "assmg":
  {
      removeallweapons _unit;
// Primary:
     {_unit addmagazine _rifle} foreach [1,2,3,4,5,6]; 
     {_unit addmagazine _smokegrenadewhite} foreach [1]; 
     {_unit addmagazine _grenade} foreach [1];          
     _unit addweapon _rifle;
     _unit addweapon ACE_Rucksack_RD99;
// Secondary:
     {_unit addmagazine _bandage;} foreach [1,2,3];
     {_unit addmagazine _morphine;} foreach [1,2];
     {_unit addmagazine _epinephrine;} foreach [1];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addWeapon "ItemMap";
     _unit addweapon "ItemCompass";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";
// backpack:
     [_unit,"100Rnd_762x54_PK",2] spawn f_addMagToRuck;

     _unit selectweapon primaryweapon _unit;  
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";    
     };

// ====================================================================================

// ====================================================================================

// LOADOUT:-
//   Groupe HQ
//   Medecin

  case "med":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
// Primary: 
     {_unit addmagazine _riflemag} foreach [1,2,3,4,5,6];
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];           
     _unit addweapon _riflecrew;
     _unit addweapon _medicrucksack;
// Secondary:
     {_unit addmagazine _bandage;} foreach [1,2,3];
     {_unit addmagazine _morphine;} foreach [1,2];
     {_unit addmagazine _epinephrine;} foreach [1,2];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addweapon "Binocular";
     _unit addweapon "ItemGPS";
     _unit addweapon "ItemCompass";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";
// Backpack:
     [_unit,"30Rnd_545x39_AK",1] spawn f_addMagToRuck;                  
     [_unit,"SmokeShellYellow",1] spawn f_addMagToRuck;   
     [_unit,"ACE_Bandage",6] spawn f_addMagToRuck;
     [_unit,"ACE_Morphine",5] spawn f_addMagToRuck;
     [_unit,"ACE_epinephrine",5] spawn f_addMagToRuck;
     [_unit,"ACE_Medkit",5] spawn f_addMagToRuck;

     _unit selectweapon primaryweapon _unit;   
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";   
     };

// ====================================================================================


// ====================================================================================

// LOADOUT:-
//   Javelin Gunner

  case "javelingunner":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
// Primary:
     {_unit addmagazine _JavelinAmmo} foreach [1]; 
     {_unit addmagazine _riflemag} foreach [1,2,3,4];           
     _unit addweapon _rifle;
     _unit addweapon _Javelin;  
// Secondary:
     {_unit addmagazine _pistolmag;} foreach [1];
_unit addweapon _pistol;
     {_unit addmagazine _bandage;} foreach [1,2,3];
     {_unit addmagazine _morphine;} foreach [1,2];
     {_unit addmagazine _epinephrine;} foreach [1,2];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addweapon "ItemGPS";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";

     _unit selectweapon primaryweapon _unit;  
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";    
     };

// ====================================================================================


// ====================================================================================

// LOADOUT:-
//   Javelin Assistant

  case "javelinassistant":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
// Primary:
     {_unit addmagazine _JavelinAmmo} foreach [1]; 
     {_unit addmagazine _riflemag} foreach [1,2,3,4]; 
     {_unit addmagazine _smokegrenadewhite} foreach [1,2];           
     _unit addweapon _rifle;
// Secondary:
     {_unit addmagazine _pistolmag;} foreach [1];
_unit addweapon _pistol;
     {_unit addmagazine _bandage;} foreach [1,2,3];
     {_unit addmagazine _morphine;} foreach [1,2];
     {_unit addmagazine _epinephrine;} foreach [1,2];
// Kit:
     _unit addweapon "NVGoggles";
     _unit addweapon "ItemGPS";
     _unit addweapon "Binocular";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";

     _unit selectweapon primaryweapon _unit;  
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";    
     };

// ====================================================================================

// ====================================================================================

// LOADOUT:-
//   SMAW Gunner

  case "smawgunner":
  {
     if ( _unit call ace_sys_ruck_fnc_HasRuck ) then {[_unit, "ALL"] call ACE_fnc_RemoveGear;};
      removeallweapons _unit;
// Primary:
     {_unit addmagazine _SMAWHEAA} foreach [1, 2];
     {_unit addmagazine _SMAWHEDP} foreach [1];
     {_unit addmagazine _riflemag} foreach [1,2,3,4];   
     {_unit addmagazine _SMAWSpotting;} foreach [1];         
     _unit addweapon _rifle;
     _unit addweapon _SMAWLauncher;  
// Secondary:
     {_unit addmagazine _pistolmag;} foreach [1];
_unit addweapon _pistol;
     {_unit addmagazine _bandage;} foreach [1];
     {_unit addmagazine _morphine;} foreach [1];
     {_unit addmagazine _epinephrine;} foreach [1];
     //{_unit addmagazine _SMAWSpotting;} foreach [1,2,3,4];

// Kit:
     _unit addweapon "NVGoggles";
     _unit addweapon "ItemGPS";
     _unit addWeapon "ACE_Earplugs";
     _unit addWeapon "ACE_GlassesLHD_glasses";

     _unit selectweapon primaryweapon _unit;  
     [_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";
     [_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";    
     };

// ==================================================================================

// ERROR CHECKING
// If the unit type could not be successfully detected the script exits with an error.

  default
  {
  if (true) exitwith {player globalchat format ["DEBUG (f\common\@ShackTac_assignGear.sqf): Unit = %1. Gear template %2 does not exist.",_unit,_typeofunit]};
  };
};

Share this post


Link to post
Share on other sites

Afraid I can't see anything obvious, but I no longer work with ACE2, so perhaps there is something specific about its functions that is conflicting with the script. Might be worth asking the ACE2 devs - it's possible that this is an issue of precise timing, whereby the script is conflicting with / being over-ridden by an ACE2 function or config. Sorry I can't be of more help - perhaps other readers of this thread have solutions/ideas?

Share this post


Link to post
Share on other sites

Problem solved thank to Sickboy. :)

Just remove the two lines:

[_unit] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";

[_unit, "ACE_GlassesLHD_glasses"] execFSM "x\ace\addons\sys_goggles\use_glasses.fsm";

And no more problem.

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  

×