iceman77 18 Posted November 11, 2013 works perfectly. A question ... how do I assign each player the switch of the class?eg oberst [player] call TAG_FNC_Rifleman; Iceman77 [player] call TAG_FNC_Grenadier .... etc. etc. Something like this If (!IsDedicated) Then { waitUntil { !IsNull Player }; if (local player) then { waitUntil { time > 1 }; switch (faction player) do { case "BLU_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsBlu.sqf";}; case "BLU_G_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsFia.sqf";}; case "IND_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsInd.sqf";}; case "OPF_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsOpf.sqf";}; }; switch (player) do { case man1:{[player] call TAG_FNC_Rifleman;}; case man2:{[player] call TAG_FNC_Grenadier;}; case man3:{[player] call TAG_FNC_AutoRifleman;}; }; }; }; @ Hazzard - Look at your addons readme. It may tell you the name of the faction for the units. Share this post Link to post Share on other sites
2rgt oberst 14 Posted November 11, 2013 Something like this If (!IsDedicated) Then { waitUntil { !IsNull Player }; if (local player) then { waitUntil { time > 1 }; switch (faction player) do { case "BLU_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsBlu.sqf";}; case "BLU_G_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsFia.sqf";}; case "IND_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsInd.sqf";}; case "OPF_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsOpf.sqf";}; }; switch (player) do { case man1:{[player] call TAG_FNC_Rifleman;}; case man2:{[player] call TAG_FNC_Grenadier;}; case man3:{[player] call TAG_FNC_AutoRifleman;}; }; }; }; I'm sorry ... when you write "case man1" what you mean? I have to write something on the editor in the slot to retrieve it? beginning to try something;) ---------- Post added at 09:20 ---------- Previous post was at 09:07 ---------- OK, I tried entering the same slot name the file client.sqf. works perfectly ... tonight I have a game on the server with 60 player ... hope all is well: D Thanks again Share this post Link to post Share on other sites
2rgt oberst 14 Posted November 11, 2013 my configuration ;) If (!IsDedicated) Then { waitUntil { !IsNull Player }; if (local player) then { waitUntil { time > 1 }; switch (faction player) do { case "BLU_F":{[] call compile preprocessFile "Loadouts\LoadoutsBlu.sqf";}; case "BLU_G_F":{[] call compile preprocessFile "Loadouts\LoadoutsFia.sqf";}; case "IND_F":{[] call compile preprocessFile "Loadouts\LoadoutsInd.sqf";}; case "OPF_F":{[] call compile preprocessFile "Loadouts\LoadoutsOpf.sqf";}; }; switch (player) do { hint format ["Aspetta qualche secondo %1... cambio classe...", name player]; sleep 5; hint format ["Hai cambiato classe correttamente %1. ", name player]; case BRAVO1:{[player] call TAG_FNC_TL;}; case BRAVO2:{[player] call TAG_FNC_AutoRifleman;}; case BRAVO3:{[player] call TAG_FNC_Medico;}; case BRAVO4:{[player] call TAG_FNC_Sniper;}; case BRAVO5:{[player] call TAG_FNC_Fuciliere;}; case ALPHA1:{[player] call TAG_FNC_TL;}; case ALPHA2:{[player] call TAG_FNC_Radio;}; case ALPHA3:{[player] call TAG_FNC_Medico;}; case ALPHA4:{[player] call TAG_FNC_AutoRifleman;}; case ALPHA5:{[player] call TAG_FNC_AutoRifleman;}; case BULDOZER1:{[player] call TAG_FNC_TL;}; case BULDOZER2:{[player] call TAG_FNC_Sniper;}; case BULDOZER3:{[player] call TAG_FNC_Medico;}; case BULDOZER4:{[player] call TAG_FNC_AA;}; case BULDOZER5:{[player] call TAG_FNC_AT;}; case GHOST1:{[player] call TAG_FNC_CecchinoG;}; case GHOST2:{[player] call TAG_FNC_Marksman;}; case ANGEL1:{[player] call TAG_FNC_TL;}; case ANGEL2:{[player] call TAG_FNC_Medico;}; case ANGEL3:{[player] call TAG_FNC_AutoRifleman;}; case ANGEL4:{[player] call TAG_FNC_Medico;}; case FALCON1:{[player] call TAG_FNC_Pilot;}; case FALCON2:{[player] call TAG_FNC_Pilot;}; case FALCON3:{[player] call TAG_FNC_Pilot;}; case EAGLE1:{[player] call TAG_FNC_Pilot;}; case EAGLE2:{[player] call TAG_FNC_Pilot;}; case EAGLE3:{[player] call TAG_FNC_Pilot;}; case SKY1:{[player] call TAG_FNC_Pilot;}; case LINCE1:{[player] call TAG_FNC_TL;}; case LINCE2:{[player] call TAG_FNC_Sniper;}; case LINCE3:{[player] call TAG_FNC_AA;}; case LINCE4:{[player] call TAG_FNC_AT;}; case LINCE5:{[player] call TAG_FNC_Medico;}; case LINCE6:{[player] call TAG_FNC_AutoRifleman;}; case LINCE7:{[player] call TAG_FNC_AutoRifleman;}; }; //[player] call TAG_FNC_AT_Light; // example, could be called from wherever you like }; }; Share this post Link to post Share on other sites
HaZZarD 2 Posted November 11, 2013 (edited) Would be important to understand if there is a bug with loadouts in last update , I never saw so many people with custom loadout troubles before and regarding me I am not an expert but is the first time I have such issues with loadouts . today full custom loadout test in multy , I'am getting mad , hours just to have the soldiers with custom loadouts and I'am not even sure to have them working FPDR I thought the Arma III editor could be a funny hobby before realizing that what work in the editor then never work in MP :banghead::mad: ... I' am massively upset and close to quit with the editor right now the ones not good in scripting are TOTALLY OUT from making missions what can save the situation is the DEVs helping and making the customloadouts less a pain ..for god sake ! PS: I love Arma III , I am just starting hate this damn editor Edited November 11, 2013 by HaZZarD Share this post Link to post Share on other sites
iceman77 18 Posted November 11, 2013 ... Chill out man. Sp scripting is much more enjoyable if you're looking for a relaxing hobby, and you're a total novice. If you want to pull your hair out, then mp scripting is the way to go... dive right into that newly opened can of worms! Share this post Link to post Share on other sites
HaZZarD 2 Posted November 11, 2013 well thanks for the support dude , I am not giving up ... yet : ) but when you make MP mission is really the hell , 99.9% of my post here are questions about things that work in the editor but then not in MP and 50% of those 99.9% are question about custom loadouts :S this is why I' am iper frustrated All I need now is the case code for the mod ( case "OPF_F" ) , I can't find it in the readme and I' am not sure massi will answer me any way to find the case digging in the mod files ? Share this post Link to post Share on other sites
iceman77 18 Posted November 11, 2013 All I need now is the case code for the mod ( case "OPF_F" ) , I can't find it in the readme and I' am not sure massi will answer me any way to find the case digging in the mod files? Or you could go to the release thread and ask in there. Even if the author doesn't respond, someone else who has the addon may. Or, you could go into the mods files / cfg and see the factions name. ---------- Post added at 13:14 ---------- Previous post was at 13:00 ---------- Actually, if you have the mod loaded, you may be able to go into the BIS config viewer and see the addons cfg from there. As you can do with missions. Share this post Link to post Share on other sites
HaZZarD 2 Posted November 11, 2013 Or you could go to the release thread and ask in there. Even if the author doesn't respond, someone else who has the addon may. Or, you could go into the mods files / cfg and see the factions name.---------- Post added at 13:14 ---------- Previous post was at 13:00 ---------- Actually, if you have the mod loaded, you may be able to go into the BIS config viewer and see the addons cfg from there. As you can do with missions. yay found it under CfgFactionClasses , "mas_rus_spet" it works ;D thanks GG Share this post Link to post Share on other sites
Beerkan 71 Posted November 13, 2013 I have this setup as the init of my unit. null = [this] call NEW_fnc_BLUFORLoadout; ;this addeventhandler ["respawn","_this call NEW_fnc_BLUFORLoadout"]; When I spawn, I am wearing a default uniform. Clearly the function is loading correclty because when the unit respawn's it does so with the new loadout as definded in my BLUFOR_loadouts.sqf I understand it's because I am calling the function after the unit is in already the game. In Icemans example loadout mission, the script waits 5 seconds before switching uniform (by calling the function) However, how do I make my units start with the NEW_fnc_BLUFORLoadout? Share this post Link to post Share on other sites
iceman77 18 Posted November 13, 2013 Remove the 5 second sleep before the loadout function is called. It will be called quicker, thus giving you the loadout quicker. Share this post Link to post Share on other sites
R4IDER 10 Posted November 14, 2013 If (!IsDedicated) Then { waitUntil { !IsNull Player }; if (local player) then { waitUntil { time > 1 }; switch (faction player) do { case "BLU_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsBlu.sqf";}; case "BLU_G_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsFia.sqf";}; case "IND_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsInd.sqf";}; case "OPF_F":{[] call compile preprocessFile "digitalLoadout\LoadoutsOpf.sqf";}; }; [player] call TAG_FNC_Rifleman; // then call a loadout now, for example }; }; How would you go about making this work for respawns? Share this post Link to post Share on other sites
iceman77 18 Posted November 14, 2013 Use an respawn eventhandler. players init line this [b]addEventHandler[/b] ["respawn", {call TAG_fnc_Rifleman}]; Share this post Link to post Share on other sites
R4IDER 10 Posted November 14, 2013 Well isn't it the unts init line that is the cause to all of these problems? it seems to me that when a player joins the server an AI joins just before the player does and at that point the init line on that character gets ran on each client rather than just the units init. Share this post Link to post Share on other sites
iceman77 18 Posted November 14, 2013 (edited) Well isn't it the unts init line that is the cause to all of these problems? it seems to me that when a player joins the server an AI joins just before the player does and at that point the init line on that character gets ran on each client rather than just the units init. The respawn EH should work fine in the units init line. 'this' is pointing to the unit in question only. Unless I'm not understanding what you're getting at. Edited November 14, 2013 by Iceman77 Share this post Link to post Share on other sites
2rgt oberst 14 Posted November 14, 2013 perhaps it is the common problem of random unit? Unfortunately, I have seen that you can not customize, you lose the clothes and remains with underwear Share this post Link to post Share on other sites
iceman77 18 Posted November 14, 2013 perhaps it is the common problem of random unit? Unfortunately, I have seen that you can not customize, you lose the clothes and remains with underwear Random unit? Can't customize? What do you mean? Shoot me an example mission that reproduces the problem. I've been loading out players the way I showed and never had any problems with naked people... Share this post Link to post Share on other sites
Deadfast 43 Posted November 14, 2013 (edited) So I just did some testing in MP with a friend and I found the following: removeUniform is global addUniform is local running addUniform (even globally) directly after removeUniform causes naked shenanigans In other words, this code will fail... removeUniform player; [[player, {_this addUniform "U_I_CombatUniform"}], "BIS_fnc_spawn", true] call BIS_fnc_MP; ...as will this code... [[player, {removeUniform _this; _this addUniform "U_I_CombatUniform"}], "BIS_fnc_spawn", true] call BIS_fnc_MP; ...but this one will work... removeUniform player; sleep 1; [[player, {_this addUniform "U_I_CombatUniform"}], "BIS_fnc_spawn", true] call BIS_fnc_MP; Edited November 15, 2013 by Deadfast Share this post Link to post Share on other sites
iceman77 18 Posted November 14, 2013 Thanks Deadfast. Share this post Link to post Share on other sites
HaZZarD 2 Posted November 15, 2013 is BIS aware of this problem ? Share this post Link to post Share on other sites
progamer 14 Posted November 16, 2013 So I just did some testing in MP with a friend and I found the following: removeUniform is global addUniform is local running addUniform (even globally) directly after removeUniform causes naked shenanigans In other words, this code will fail... removeUniform player; [[player, {_this addUniform "U_I_CombatUniform"}], "BIS_fnc_spawn", true] call BIS_fnc_MP; ...as will this code... [[player, {removeUniform _this; _this addUniform "U_I_CombatUniform"}], "BIS_fnc_spawn", true] call BIS_fnc_MP; ...but this one will work... removeUniform player; sleep 1; [[player, {_this addUniform "U_I_CombatUniform"}], "BIS_fnc_spawn", true] call BIS_fnc_MP; DarkDruid told me he was working on making addUniform global. Share this post Link to post Share on other sites
iceman77 18 Posted November 16, 2013 Still haven't had any naked player problems. :confused: Share this post Link to post Share on other sites
HaZZarD 2 Posted November 16, 2013 I sometime get naked soldiers and other times soldiers with uniforms on but empty vest O____O was the empty vest issue related to the uniform problem ? because if not then there is another issue where as soon as a player join your vest become dry/empty if you play alone in MP no problem , this happen only when another player join if needed I have a mission file that show this problem Share this post Link to post Share on other sites
iceman77 18 Posted November 16, 2013 (edited) Sent you a pm hazzard. Edited November 16, 2013 by Iceman77 Share this post Link to post Share on other sites
HaZZarD 2 Posted November 16, 2013 (edited) Here we are , I prepared and updated a file for showing the bug I' am talking about to all people interested The bug presents when , hosting the mission in MP (hosting from my PC), the person which joined appear in game as one of the playable unit , as soon as he take control of a unit weird things happens . Usually most of the playable units turn their vest empty with nothing inside then in other cases , specially if the player is a JIP , playable soldiers lose their uniforms . the mission is made with mods , inside the file there are the three mods you need to run it and you can find two version of the same mission , each one made with different custom loadout methods -->LINK<-- PS : I have not tested yet the method posted by Deadfast removeUniform player; sleep 1; [[player, {_this addUniform "U_I_CombatUniform"}], "BIS_fnc_spawn", true] call BIS_fnc_MP; Edited November 16, 2013 by HaZZarD Share this post Link to post Share on other sites
iceman77 18 Posted November 16, 2013 Ah lol, thats 411MB bro. Is there any chance you can make a vanilla mission which reproduces the problem? Share this post Link to post Share on other sites