pcc 14 Posted April 3, 2020 I'm trying to spawn just tank armor units with Spawn AI module, but I get errors. It works on altis, but on other maps like stratis, it gives this error. Error in expression <pawnAI_startGarbageCollector; Error Undefined variable in expression: _group File A3\Modules_F_Heli\Misc\Functions\ModuleSpawnAI\main.sqf..., line 223 Share this post Link to post Share on other sites
DirtyDel 14 Posted April 3, 2020 class Armored { Abram { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_B_USARMY_1991_M1A1_Abrams_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "LIEUTENANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = ""CFP_B_USARMY_1991_Crewman_Des_01""; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = ""CFP_B_USARMY_1991_Crewman_Des_01""; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = ""CFP_B_USARMY_1991_Crewman_Des_01""; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; }; }; Share this post Link to post Share on other sites
Harzach 2518 Posted April 3, 2020 30 minutes ago, DirtyDel said: class Armored { Abram { class unit0 { What is missing? Share this post Link to post Share on other sites
DirtyDel 14 Posted April 3, 2020 2 minutes ago, Harzach said: What is missing? nothing, they're closed at the bottom. just like the infantry code that works properly. Share this post Link to post Share on other sites
Harzach 2518 Posted April 3, 2020 Quote class Armored { Abram { class unit0 { Share this post Link to post Share on other sites
DirtyDel 14 Posted April 3, 2020 41 minutes ago, Harzach said: Still don't see it. Maybe you could just tell me Share this post Link to post Share on other sites
Harzach 2518 Posted April 3, 2020 Quote class Armored { class Abram { class unit0 { Share this post Link to post Share on other sites
DirtyDel 14 Posted April 3, 2020 16 minutes ago, Harzach said: class CfgGroups { class west { //Side, must be one of East, West or Indep for spawnAI module to recognise it class myCustomFaction { //Name for your custom faction class Infantry { //SpawnAI module looks for this class class myCustomInfGroup { //Can be called anything, name also used for blacklisting class unit0 { vehicle = "rhsusf_army_ocp_squadleader"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "rhsusf_army_ocp_rifleman"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "rhsusf_army_ocp_rifleman"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; }; }; class Motorized {}; //SpawnAI module looks for this class class Mechanized {}; //SpawnAI module looks for this class class Armored {}; //SpawnAI module looks for this class }; }; }; class myCustomInfGroup { //Can be called anything, name also used for blacklisting Share this post Link to post Share on other sites
DirtyDel 14 Posted April 3, 2020 I'm sorry Harzach, but how do you propse I fix this? I tried class CfgVehicles . I'm at a loss. Share this post Link to post Share on other sites
Harzach 2518 Posted April 3, 2020 You need to put the word "class" in front of your group classname. class Abram In the snippet from your config above, it is not there. class Armored { Abram { //Can be called anything, name used for blacklisting Share this post Link to post Share on other sites
DirtyDel 14 Posted April 3, 2020 28 minutes ago, Harzach said: And? 13 minutes ago, Harzach said: You need to put the word "class" in front of your group classname. class Abram In the snippet from your config above, it is not there. class Armored { Abram { //Can be called anything, name used for blacklisting So I had deleted before I wrote it back into my first post in this thread, that's why there was small errors including ". the following is what I have now and its still now working: class Armored { class Abram { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_B_USARMY_1991_M1A1_Abrams_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_B_USARMY_1991_Grenadier_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; }; }; class east { class Iraq { //Name for your custom faction I Don't know how to properly make a vehicle group. looking for guidance. Share this post Link to post Share on other sites
Harzach 2518 Posted April 3, 2020 If that is your full config, understand that it must follow the same basic structure as the working infantry config referenced by Larrow on the first page of this topic. class CfgGroups { class east { class Iraq { class Infantry {}; class Motorized {}; class Mechanized {}; class Armored { class Abram { class unit0 { vehicle = "CFP_B_USARMY_1991_M1A1_Abrams_Des_01"; side = 1; rank = "SERGEANT"; position[] = { 0, 0, 0 }; }; class unit1 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; side = 1; rank = "PRIVATE"; position[] = { 5, -5, 0 }; }; class unit2 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; side = 1; rank = "PRIVATE"; position[] = { -5, -5, 0 }; }; class unit3 { vehicle = "CFP_B_USARMY_1991_Grenadier_Des_01"; side = 1; rank = "PRIVATE"; position[] = { 10, -10, 0 }; }; }; }; }; }; }; Share this post Link to post Share on other sites
DirtyDel 14 Posted April 3, 2020 no, that was a snippet of the Class Armored. I have it working with infantry only for both Army and Iraq. Only when I add the part in the Armored it doesn't work. Share this post Link to post Share on other sites
Harzach 2518 Posted April 3, 2020 Share your full code so that we can dispense with the guesswork. Wrap it in spoiler tags to minimize wear on others' scroll wheels. Share this post Link to post Share on other sites
DirtyDel 14 Posted April 3, 2020 Spoiler class CfgGroups { class west { class 91DesertArmy { //Name for your custom faction class Infantry { //SpawnAI module looks for this class class 91Armyrifle_4units { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_B_USARMY_1991_Team_Leader_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_B_USARMY_1991_Grenadier_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; }; class 91Armysupport_4units { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_B_USARMY_1991_Team_Leader_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_B_USARMY_1991_Machinegunner_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_B_USARMY_1991_Medic_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; }; class 91ArmyAT_4units { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_B_USARMY_1991_Team_Leader_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_B_USARMY_1991_AT_Specialist_Dragon_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_B_USARMY_1991_Asst_AT_Specialist_Dragon_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; }; class 91Army_8units { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_B_USARMY_1991_Squad_Leader_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "LIEUTENANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_B_USARMY_1991_Team_Leader_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_B_USARMY_1991_Automatic_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_B_USARMY_1991_Asst_Auto_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; class unit4 { vehicle = "CFP_B_USARMY_1991_Rifleman_AT_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -10, -10, 0 }; //offset position unit spawns from spawn point }; class unit5 { vehicle = "CFP_B_USARMY_1991_Medic_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; class unit6 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; class unit7 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; }; class 91Army_RIFLE8units { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_B_USARMY_1991_Squad_Leader_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "LIEUTENANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_B_USARMY_1991_Team_Leader_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_B_USARMY_1991_Machinegunner_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_B_USARMY_1991_Asst_Machinegunner_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; class unit4 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -10, -10, 0 }; //offset position unit spawns from spawn point }; class unit5 { vehicle = "CFP_B_USARMY_1991_Medic_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; class unit6 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; class unit7 { vehicle = "CFP_B_USARMY_1991_Rifleman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; }; }; class Motorized {}; //SpawnAI module looks for this class for class Mechanized {}; //SpawnAI module looks for this class class Armored { //SpawnAI module looks for this class class Abram { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_B_USARMY_1991_M1A1_Abrams_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "SERGANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_B_USARMY_1991_Crewman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_B_USARMY_1991_Crewman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_B_USARMY_1991_Crewman_Des_01"; //Class name of unit/vehicle side = 1; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; }; }; class east { class Iraq { //Name for your custom faction class Infantry { //SpawnAI module looks for this class class Iraq_Rifle_4units { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_O_IQARMY_Squad_Leader_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_O_IQARMY_Grenadier_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_O_IQARMY_RG_Rifleman_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_O_IQARMY_RG_Rifleman_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; }; class Iraq_AT_4units { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_O_IQARMY_Squad_Leader_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_O_IQARMY_RG_Rifleman_AT_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_O_IQARMY_RG_Rifleman_AT_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_O_IQARMY_RG_Rifleman_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; }; class Iraq_Support_4units { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_O_IQARMY_RG_Team_Leader_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_O_IQARMY_RG_Medic_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_O_IQARMY_RG_Machine_Gunner_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_O_IQARMY_RG_Rifleman_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; }; class Iraq_Rifle_8units { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_O_IQARMY_Squad_Leader_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "LIEUTENANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_O_IQARMY_Rifleman_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_O_IQARMY_Rifleman_AT_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_O_IQARMY_Medic_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; class unit4 { vehicle = "CFP_O_IQARMY_Machine_Gunner_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -10, -10, 0 }; //offset position unit spawns from spawn point }; class unit5 { vehicle = "CFP_O_IQARMY_Auto_Rifleman_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; class unit6 { vehicle = "CFP_O_IQARMY_Sniper_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; class unit7 { vehicle = "CFP_O_IQARMY_Grenadier_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; }; class Iraq_Rifle_RG_8units { //Can be called anything, name used for blacklisting class unit0 { vehicle = "CFP_O_IQARMY_RG_Team_Leader_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "LIEUTENANT"; //rank name from CfgRanks position[] = { 0, 0, 0 }; //offset position unit spawns from spawn point }; class unit1 { vehicle = "CFP_O_IQARMY_RG_Rifleman_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "SERGEANT"; //rank name from CfgRanks position[] = { 5, -5, 0 }; //offset position unit spawns from spawn point }; class unit2 { vehicle = "CFP_O_IQARMY_RG_Rifleman_AT_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -5, -5, 0 }; //offset position unit spawns from spawn point }; class unit3 { vehicle = "CFP_O_IQARMY_RG_Medic_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 10, -10, 0 }; //offset position unit spawns from spawn point }; class unit4 { vehicle = "CFP_O_IQARMY_RG_Machine_Gunner_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { -10, -10, 0 }; //offset position unit spawns from spawn point }; class unit5 { vehicle = "CFP_O_IQARMY_RG_Asst_Machine_Gunner_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; class unit6 { vehicle = "CFP_O_IQARMY_RG_Sniper_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; class unit7 { vehicle = "CFP_O_IQARMY_RG_Grenadier_01"; //Class name of unit/vehicle side = 0; //index of unit side being [ east, west, independent, civilian ] rank = "PRIVATE"; //rank name from CfgRanks position[] = { 15, -15, 0 }; //offset position unit spawns from spawn point }; }; }; class Motorized {}; //SpawnAI module looks for this class for class Mechanized {}; //SpawnAI module looks for this class class Armored {}; //SpawnAI module looks for this class }; }; }; Share this post Link to post Share on other sites
Harzach 2518 Posted April 3, 2020 OK, for some reason this misspelling was not present in the previous snippets: class Armored { class Abram { class unit0 { vehicle = "CFP_B_USARMY_1991_M1A1_Abrams_Des_01"; side = 1; rank = "SERGANT"; //THIS IS SPELLED INCORRECTLY Share this post Link to post Share on other sites
DirtyDel 14 Posted April 3, 2020 I got it! It was because I was trying armored before the other classes and I wasn't closing out WEST. Thank you so much for the time spent helping me. Share this post Link to post Share on other sites
singis tinge 0 Posted May 29, 2020 Is anyone able to show an example of working code or does anyone have a working mission template using vanilla assets as examples so we can copy the code and then change the unit names to whatever we want? I have been trying to get vehicles from mods to spawn by copying other peoples code but no matter what I try I just get errors. I am a novice at ArmA scripting and I have no clue what I am doing. I tried copying Dirty Del's code and changing the unit names but it didn't work for me. Share this post Link to post Share on other sites