Can i Add and remove classes at the same time? How? #1337
Answered
by
Vdauphin
deBearN
asked this question in
Question and answer
-
Main things i did you should look for ///WORKING CODE///
};
case "LOP_AFR_OPF" : {
btc_type_motorized = btc_type_motorized + ["LOP_IRA_Landrover", "rhs_uh1h_hidf", "LOP_NK_Ural_open", "LOP_NK_Ural", "rhs_gaz66_zu23_msv", "I_Truck_02_covered_F", "rhs_tigr_vmf", "RHS_Ural_Open_VMF_01", "LOP_ISTS_M1025_D"];
btc_type_motorized_armed = btc_type_motorized_armed + ["rhs_uh1h_hidf_gunship", "LOP_IRA_Landrover_M2", "rhs_bmp1_vmf", "rhsgref_BRDM2_HQ_vmf", "RHS_Ural_Zu23_VMF_01", "LOP_IRA_Nissan_PKM"];
btc_type_units = btc_type_units - ["I_C_Soldier_Camo_F"];
btc_type_gl = btc_type_gl - ["LOP_AFR_OPF_Static_AGS30_TriPod", "LOP_AFR_OPF_Static_SPG9"];
btc_type_boats = btc_type_boats - ["O_Boat_Armed_01_hmg_F", "O_T_Boat_Armed_01_hmg_F"];
};
}; What i want is next ///NOT WORKING/// the code doesn't break but doesn't execute the second part of adding or removing the classes
case "LOP_AFR_OPF" : {
btc_type_motorized = btc_type_motorized + ["LOP_IRA_Landrover", "rhs_uh1h_hidf", "LOP_NK_Ural_open", "LOP_NK_Ural", "rhs_gaz66_zu23_msv", "I_Truck_02_covered_F", "rhs_tigr_vmf", "RHS_Ural_Open_VMF_01", "LOP_ISTS_M1025_D"];
btc_type_motorized_armed = btc_type_motorized_armed + ["rhs_uh1h_hidf_gunship", "LOP_IRA_Landrover_M2", "rhs_bmp1_vmf", "rhsgref_BRDM2_HQ_vmf", "RHS_Ural_Zu23_VMF_01", "LOP_IRA_Nissan_PKM"] - ["LOP_AFR_OPF_T72BA", "LOP_AFR_OPF_T72BB"];
btc_type_units = btc_type_units - ["I_C_Soldier_Camo_F"];
btc_type_gl = btc_type_gl - ["LOP_AFR_OPF_Static_AGS30_TriPod", "LOP_AFR_OPF_Static_SPG9"];
btc_type_boats = btc_type_boats - ["O_Boat_Armed_01_hmg_F", "O_T_Boat_Armed_01_hmg_F"] + ["I_C_Boat_Transport_02_F"];
};
};
/// I'm no developer but i have a little bit of understandment of logic, i tried creating a second "btc_type_motorized_armed = btc_type_motorized_armed" with the minus but it broke the code, is there a way i can add and remove classes at the same time? |
Beta Was this translation helpful? Give feedback.
Answered by
Vdauphin
Mar 24, 2022
Replies: 1 comment 2 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
deBearN
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
From what I see, everything is fine. You are trying to do this if I understood and it is correct
If I execute this
I get this with vanilla which looks fine in a sence I see the classname you added
Cheers