GEORGE FLOROS GR 4206 Posted February 2, 2019 1 minute ago, CHICKENLICKEN said: init? First open the example mission folder and you will notice that, there is the: initServer.sqf copy paste this in your main folder of your mission and paste as wel the folder of the script. Then add your loadouts and don't forget to change as it says also in the example this to _unit. 1 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 2, 2019 For anything that you want to change , get in the example mission where there is everything available , do your changes and run your tests . 1 Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 2, 2019 i tested only 50 percent of units spawn with loadout Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 2, 2019 AH I PUT MORE LOADOUTS IN FOLDERS AND IT'S FINE FINALLY WORKING THNAKS WE FINALLY GOT THERE THE VICTORY TASTE SWEET Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 2, 2019 HAIL GEORGE FLOROS Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 2, 2019 8 minutes ago, CHICKENLICKEN said: AH I PUT MORE LOADOUTS IN FOLDERS AND IT'S FINE FINALLY WORKING THNAKS WE FINALLY GOT THERE THE VICTORY TASTE SWEET Tell me something , you want to chage with different loadouts for east and independent , are you using these folders and have you set to false the option about loadouts to certain units? Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 2, 2019 9 minutes ago, GEORGE FLOROS GR said: Tell me something , you want to chage with different loadouts for east and independent , are you using these folders and have you set to false the option about loadouts to certain units? I just copied what you put. seems, to be working 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 2, 2019 2 minutes ago, CHICKENLICKEN said: I just copied what you put. seems, to be working 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 2, 2019 If you like martial arts etc , watch our Word Champion Mike Zambidis Iron Mike ! http://www.ironmikezambidis.com/en/biography Enjoy ! 1 Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 2, 2019 YEs thanks he is an excellentfighter. Hmm there is a slight problem. I am only getting units spawn with the loadout 1 and loudout 2. Loadout 3 to 7 are not appearing, they are still random. Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 2, 2019 They are random . It will select an sqf of the folder every time on random, Might be that you are not using the correct folder ? Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 2, 2019 hmm no as first two loadouts are just as I have in the folders for east and independent. Just the rest won't spawn Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 2, 2019 22 minutes ago, CHICKENLICKEN said: Just the rest won't spawn The rest is applied to who ? Since the selection is not for certain unitls then right now there is only loadouts for east and independent loadout , if you want for west or civilian add more code to there Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 2, 2019 I only have spawning east and Opfor enemies. It still only shows first two loadouts. let me test again. Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 3, 2019 Could be this? Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 3, 2019 Yep. Seems to only spawn loadouts 1 and 2, ignoring 3 ,4 ,5 ,6 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 3, 2019 1 minute ago, CHICKENLICKEN said: ignoring 3 ,4 ,5 ,6 did you name this the dame like : Loadout_3 ? Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 3, 2019 if it's reading these two , it means that you are doing something wrong and for the error above i can't understand what the problem is. Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 3, 2019 I just copied and paster your last SQF Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 3, 2019 I got it to work. But still spawns randoms. Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 3, 2019 5 hours ago, CHICKENLICKEN said: I just copied and paster your last SQF You haven't yet download the new version ? Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 3, 2019 On 2/2/2019 at 6:12 AM, GEORGE FLOROS GR said: It was not working , because i didn't noticed that the code that i gaved you had _x instead of _this , you had also the eventhandler inside the if () then{ Since there is all these options available , i will update the script . So your code is this corrected and it will be the same after the update as well. Reveal hidden contents //________________ Author : GEORGE FLOROS [GR] ___________ 02.02.19 _____________ /* ________________ GF Exported Loadouts Script - Mod ________________ https://forums.bohemia.net/forums/topic/221232-gf-exported-loadouts-script-mod/ Please keep the Credits or add them to your Diary https://community.bistudio.com/wiki/SQF_syntax Don't try to open this with the simple notepad. For everything that is with comment // in front or between /* means that it is disabled , so there is no need to delete the extra lines. You can open this ex: with notepad++ https://notepad-plus-plus.org/ ArmA 3 | Notepad ++ SQF tutorial https://www.youtube.com/watch?v=aI5P7gp3x90 and also use the extra pluggins (this way will be better , it will give also some certain colors to be able to detect ex. problems ) http://www.armaholic.com/page.php?id=8680 or use any other program for editing . For the Compilation List of my GF Script - Mods , you can search in: https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-Script - Mods/ */ //________________ You can add in the init of a unit to exclude ________________ // this setVariable ["Var_GF_Exported_Loadouts", true]; //________________ Settings ________________ //________________ Set true or false ________________ _Systemchat_info = true; _diag_log_info = true; GF_Exported_Loadouts_to_Certain_Classnames = false; GF_Exported_Loadouts_Change_Loadout_on_Respawn = true; if(_Systemchat_info) then { systemchat "GF Exported Loadouts Script - Mod Initializing"; }; if(_diag_log_info) then { diag_log "//________________ GF Exported Loadouts Script - Mod Initializing _____________"; diag_log "//________________ GF_Exported_Loadouts.sqf _____________"; }; //________________ You can add an Exclude List ________________ GF_Exported_Loadouts_Exclude_List = [ // Ravage zombies "zombie_bolter", "zombie_runner", "zombie_walker", "B_Pilot_F", "B_Fighter_Pilot_F", "B_Helipilot_F", "B_helicrew_F", "B_soldier_PG_F", "O_Pilot_F", "O_Fighter_Pilot_F", "O_helipilot_F", "O_helicrew_F", "O_soldier_PG_F", "I_pilot_F", "I_Fighter_Pilot_F", "I_helipilot_F", "I_helicrew_F" ]; //________________ add your sqf names of the exported loadouts , in case you select allunits option ________________ GF_Exported_Loadouts_array_allunits = [ "Loadout_1", "Loadout_2" ]; //________________ add your sqf names of the exported loadouts , in case you select Certain Classnames option ________________ GF_Exported_Loadouts_array_Rifleman = [ "Loadout_1", "Loadout_2" ]; //________________ add your sqf names of the exported loadouts , in case you select Certain Classnames option ________________ GF_Exported_Loadouts_array_Sniper = [ "Loadout_1", "Loadout_2" ]; //________________ Certain Classnames option ________________ //________________ add the Classnames , that will change the loadout for the Certain Classnames option ________________ GF_Exported_Loadouts_Riflemen = [ "B_Soldier_F", "B_Soldier_lite_F" ]; //________________ add the Classnames , that will change the loadout for the Certain Classnames option ________________ GF_Exported_Loadouts_Sniper = [ "B_sniper_F", "B_spotter_F" ]; GF_Exported_Loadouts = { //________________ Change_Loadout_on_Respawn ________________ if (GF_Exported_Loadouts_Change_Loadout_on_Respawn) then { _this addEventHandler ["Respawn", { params ["_unit", "_corpse"]; _unit setVariable ["Var_GF_Exported_Loadouts",false]; }]; }; //________________ in case you select allunits option ________________ _allunits = selectRandom GF_Exported_Loadouts_array_allunits; //________________ in case you select Certain Classnames option ________________ //________________ add here your custom array to selectRandom ________________ _Rifleman = selectRandom GF_Exported_Loadouts_array_Rifleman; _Sniper = selectRandom GF_Exported_Loadouts_array_Sniper; //________________ GF_Exported_Loadouts_to_Certain_Classnames ________________ //________________ check your directory ________________ //________________ GF_Exported_Loadouts_to_Certain_Classnames = true ________________ if(GF_Exported_Loadouts_to_Certain_Classnames) then { //________________ add here your case ________________ // Rifleman if(typeof _this in GF_Exported_Loadouts_Riflemen) then {[_this] execVM format ["GF_Exported_Loadouts\Loadouts\Rifleman\%1.sqf", _Rifleman];}; // Sniper if(typeof _this in GF_Exported_Loadouts_Sniper) then {[_this] execVM format ["GF_Exported_Loadouts\Loadouts\Sniper\%1.sqf", _Sniper];}; // if + allunits, uncomment below : if( //________________ add here your cases ________________ (!(typeof _this in GF_Exported_Loadouts_Riflemen)) && (!(typeof _this in GF_Exported_Loadouts_Sniper)) ) then { [_this] execVM format ["GF_Exported_Loadouts\Loadouts\allunits\%1.sqf", _allunits]; }; } else { //________________ GF_Exported_Loadouts_to_Certain_Classnames = false ________________ //________________ allunits ________________ //________________ if you want uncomment this for allunits ________________ // [_this] execVM format ["GF_Exported_Loadouts\Loadouts\allunits\%1.sqf", _allunits]; //________________ add your cases , according to the side ________________ if(side group _this isEqualto east) then{ [_this] execVM format ["GF_Exported_Loadouts\Loadouts\east\%1.sqf", _allunits]; }; if(side group _this isEqualto independent) then{ [_this] execVM format ["GF_Exported_Loadouts\Loadouts\independent\%1.sqf", _allunits]; }; }; }; [] spawn { while {true} do { { if ( ((alive _x)) && (!(_x getVariable ["Var_GF_Exported_Loadouts",false])) && (!((typeOf _x) in GF_Exported_Loadouts_Exclude_List)) /* //________________ You can filter the side here ________________ && {((side group _x) isEqualto west || (side group _x) isEqualto east || (side group _x) isEqualto independent || (side group _x) isEqualto civilian)} */ // && (side group _x isEqualto playerSide) // && (!(side group _x isEqualto playerSide)) ) then { _x spawn GF_Exported_Loadouts; }; _x setVariable ["Var_GF_Exported_Loadouts",true]; {waitUntil {!alive _x}; _x setVariable ["Var_GF_Exported_Loadouts",false]; }; }forEach allUnits; sleep 5; }; }; if(_Systemchat_info) then { systemchat "GF Exported Loadouts Script - Mod Initialized"; }; if(_diag_log_info) then { diag_log "//________________ GF Exported Loadouts Script - Mod Initialized _____________"; }; and by he way , thanks CHICKENLICKEN for the inspiration ! Yes, using new version, and I used what you posted here in SQF. Share this post Link to post Share on other sites
CHICKENLICKEN 56 Posted February 3, 2019 the randoms might be from the exclude list? I will delete all exlusions Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 3, 2019 20 minutes ago, CHICKENLICKEN said: I used what you posted here in SQF. What i posted here, generally is included. Just really , what exacly you want to do ? You told me that you want all the East side to have a folder with loadouts and the same with independent. You can add in that folder as much as you like or only one and it will pick one on random , since you are using the same form as in the 2 examples incuded and have the same name. The exclude list will exclude certain units. Edit your loadout and test them in the example mission and onceit's done then add Vandeansons scripts , because they might also interfere as well. Share this post Link to post Share on other sites