zukov 490 Posted January 17, 2019 i tried to stop the headgear randomization directly on the config file in the cgfvehicles section but i have a error "scope" in that line like the example (obvoiusly i put eventhandlers like external class reference)https://community.bistudio.com/wiki/Arma_3_Characters_And_Gear_Encoding_Guide#Headgear_configuration class O_Soldier_Wdl_pants_f: O_G_Soldier_SL_F { author = "$STR_A3_Bohemia_Interactive"; scope = 2; scopeCurator = 2; // 2 = class is available in Zeus; 0 = class is unavailable in Zeus. scopeArsenal = 0; model = "\A3\Characters_F_EPB\Guerrilla\ig_guerrilla5_1.p3d"; uniformClass = "U_O_Kerry_Uniform_wdl_pants"; hiddenSelections[] = {"Camo","insignia"}; hiddenSelectionsTextures[] = {"\A3\Characters_F_EPB\Guerrilla\Data\ig_guerrilla5_1_co.paa"}; linkedItems[] = {V_PlateCarrierk_nflg, H_MilCap_gry, ItemMap, ItemCompass, ItemWatch, ItemRadio, }; respawnLinkedItems[] = {V_PlateCarrierk_nflg, H_MilCap_gry, ItemMap, ItemCompass, ItemWatch, ItemRadio,}; }; class EventHandlers: EventHandlers {init = "";}; Share this post Link to post Share on other sites
sparfell_19 188 Posted January 18, 2019 class EventHandlers must be inside the O_Soldier_Wdl_pants_f class. Share this post Link to post Share on other sites
zukov 490 Posted January 18, 2019 @sparfell_19 i tried always same error, maybe is not possible leave empty code... class O_STavrou_TL : O_G_Soldier_TL_F { scope = 2; scopeCurator = 2; // 2 = class is available in Zeus; 0 = class is unavailable in Zeus. scopeArsenal = 0; editorPreview = "\A3\EditorPreviews_F\Data\CfgVehicles\I_G_resistanceLeader_F.jpg"; hiddenSelections[] = {"Camo","insignia"}; hiddenSelectionsTextures[] = {"\A3\Characters_F_EPB\Guerrilla\Data\ig_guerrilla4_1_co.paa"}; model = "\A3\Characters_F_EPB\Guerrilla\ig_guerrilla4_1.p3d"; uniformClass = "U_O_STavrou_TL"; linkedItems[] = {V_PlateCarrier1_GUE_K, H_Booniehat_khk_hs, ItemMap, ItemCompass, ItemWatch, ItemRadio, }; respawnLinkedItems[] = {V_PlateCarrier1_GUE_K, H_Booniehat_khk_hs, ItemMap, ItemCompass, ItemWatch, ItemRadio,}; class EventHandlers: EventHandlers {init = "";}; }; Share this post Link to post Share on other sites
sparfell_19 188 Posted January 18, 2019 The class EventHandlers must be previously defined in the correct parent class. The issue is probably not in the code you are showing. For instance : class Civilian_F; class C_man_1: Civilian_F { class EventHandlers; }; class C_MU_man_random_civil_F : C_man_1 { scope = 2; scopeCurator = 2; displayName = $STR_MU_civilian_random_civil; class EventHandlers: EventHandlers { init = "(_this select 0) execVM ""\MU\MU_CIVILIAN\scripts\random_civil_body.sqf""; (_this select 0) execVM ""\MU\MU_CIVILIAN\scripts\random_civil_head.sqf"""; }; MU_PREVIEW(C_MU_man_random_civil_F); }; Share this post Link to post Share on other sites
zukov 490 Posted January 18, 2019 in your example, you declared more units classes than me (I apologize my knowledge of BI code is newbie) class O_STavrou_TL : // my new unit O_G_Soldier_TL_F //this is the unit with the randomization inherit from game (opfor FIA) { class EventHandlers;// your example is here? scope = 2; scopeCurator = 2; scopeArsenal = 0; editorPreview = "\A3\EditorPreviews_F\Data\CfgVehicles\I_G_resistanceLeader_F.jpg"; hiddenSelections[] = {"Camo","insignia"}; hiddenSelectionsTextures[] = {"\A3\Characters_F_EPB\Guerrilla\Data\ig_guerrilla4_1_co.paa"}; model = "\A3\Characters_F_EPB\Guerrilla\ig_guerrilla4_1.p3d"; uniformClass = "U_O_STavrou_TL"; linkedItems[] = {V_PlateCarrier1_GUE_K, H_Booniehat_khk_hs, ItemMap, ItemCompass, ItemWatch, ItemRadio, }; respawnLinkedItems[] = {V_PlateCarrier1_GUE_K, H_Booniehat_khk_hs, ItemMap, ItemCompass, ItemWatch, ItemRadio,}; class EventHandlers: EventHandlers {init = "";}; }; 1 hour ago, sparfell_19 said: The class EventHandlers must be previously defined in the correct parent class. The issue is probably not in the code you are showing. For instance : class Civilian_F; class C_man_1: Civilian_F { class EventHandlers; }; class C_MU_man_random_civil_F : C_man_1 { scope = 2; scopeCurator = 2; displayName = $STR_MU_civilian_random_civil; class EventHandlers: EventHandlers { init = "(_this select 0) execVM ""\MU\MU_CIVILIAN\scripts\random_civil_body.sqf""; (_this select 0) execVM ""\MU\MU_CIVILIAN\scripts\random_civil_head.sqf"""; }; MU_PREVIEW(C_MU_man_random_civil_F); }; Share this post Link to post Share on other sites
sparfell_19 188 Posted January 18, 2019 Then something like this should work : I_G_Soldier_base_F is the parent class where class EventHandler is defined in your case. class SoldierGB; class I_G_Soldier_base_F: SoldierGB { class EventHandler; }; class I_G_Soldier_TL_F: I_G_Soldier_base_F {}; class O_G_Soldier_TL_F: I_G_Soldier_TL_F {}; class O_STavrou_TL: O_G_Soldier_TL_F { scope = 2; scopeCurator = 2; scopeArsenal = 0; editorPreview = "\A3\EditorPreviews_F\Data\CfgVehicles\I_G_resistanceLeader_F.jpg"; hiddenSelections[] = {"Camo","insignia"}; hiddenSelectionsTextures[] = {"\A3\Characters_F_EPB\Guerrilla\Data\ig_guerrilla4_1_co.paa"}; model = "\A3\Characters_F_EPB\Guerrilla\ig_guerrilla4_1.p3d"; uniformClass = "U_O_STavrou_TL"; linkedItems[] = {V_PlateCarrier1_GUE_K, H_Booniehat_khk_hs, ItemMap, ItemCompass, ItemWatch, ItemRadio, }; respawnLinkedItems[] = {V_PlateCarrier1_GUE_K, H_Booniehat_khk_hs, ItemMap, ItemCompass, ItemWatch, ItemRadio,}; class EventHandlers: EventHandlers { init = ""; }; }; Share this post Link to post Share on other sites
zukov 490 Posted January 18, 2019 54 minutes ago, sparfell_19 said: Then something like this should work : I_G_Soldier_base_F is the parent class where class EventHandler is defined in your case. doesn't work give me a error "undefined EventHandlers base class " i let as is, the better way in MP is to add a script to prevent randomization, i'm sorry that in this manner in sp doesn't have the helmets thanks a Lot! Share this post Link to post Share on other sites
sparfell_19 188 Posted January 18, 2019 7 minutes ago, zukov said: doesn't work give me a error "undefined EventHandlers base class " i let as is, the better way in MP is to add a script to prevent randomization, i'm sorry that in this manner in sp doesn't have the helmets thanks a Lot! This is just because I made typo. There is a missing "s" in the first EventHandler_. ;) Share this post Link to post Share on other sites