Jump to content
rakowozz

Added Uniform Disappears in Multiplayer

Recommended Posts

Yeah, a few. I'll shoot you an example sometime in a bit.

---------- Post added at 10:24 ---------- Previous post was at 10:23 ----------

Did you take the sleep out of the function(s) or spawn the function instead of calling it?

I'm afraid I've tried both.. :( Feels like making a unit addon is soon the only possible outcome.

Share this post


Link to post
Share on other sites

Thanks Iceman77,

For making it work with respawn

Unit init:

this addEventHandler ["Respawn", {call TAG_FNC_Rifleman}];

Share this post


Link to post
Share on other sites

Yeah most of the commands are global anyhow. I'm not much on mp scripting in any case. The script would be running locally on the client anyhow since it's called through the init.sqf. (for each client, in my way of thinking)

It works for me & I've noticed no issues in MP also others have had success according to posts #90 & #92. Feel free to alter it to what it should be or in any way you like. You may want to tamper with the way to add uniforms, by maybe using bis_fnc_mp as deadfast has suggested.

Edited by Iceman77

Share this post


Link to post
Share on other sites

Hey Iceman, the respawn function only works partly. I am greatful we have a solution where players can JIP and respawn with their clothes on :) ... but you respawn with the loadout you had when you died. E.g. if you would have picked up an enemy weapon, you'll respawn with that weapon.

Share this post


Link to post
Share on other sites

To respawn with a loadout (weapon you picked up on the BF) you had when you died, would actually require very purposeful scripting. IE; You'd have to store all of that gear into variables and then give it back to the player upon respawn. I did no such thing in any of the code I posted here. Unless I made a mistake and posted a weapons save script instead. Please double check the mission you're playing. Or.. shoot me the mission file so I can see what you mean.

note: This thread has worn me down to a nub. I should have never posted anything here... LOL

Edited by Iceman77

Share this post


Link to post
Share on other sites

Any incoming hotfix or half a month of running in panties? Uniforms disappear when another player joins. If you want a example faulty mission PM me.

Share this post


Link to post
Share on other sites

Why is a hot fix needed? It's not a bug. It's a locality issue with your script(s).

Share this post


Link to post
Share on other sites

Is virtual ammo box faulty then?

And any other solution than just not using removeUniform and addUniform?

Everything worked properly some time ago.

Share this post


Link to post
Share on other sites

Idk about VAS. I do know addUniform is a local command... and I know I've no problems with uniforms disappearing. Along with some others I've helped in this thread. If you dig around in the last 2 or 3 pages of this thread you should be able to find a solution to your problem.

Share this post


Link to post
Share on other sites
To respawn with a loadout (weapon you picked up on the BF) you had when you died, would actually require very purposeful scripting. IE; You'd have to store all of that gear into variables and then give it back to the player upon respawn. I did no such thing in any of the code I posted here. Unless I made a mistake and posted a weapons save script instead. Please double check the mission you're playing. Or.. shoot me the mission file so I can see what you mean.

note: This thread has worn me down to a nub. I should have never posted anything here... LOL

Sorry to say Iceman, but I did a test with your 'Fully working Example Mission':

- Dedicated Server

- 3 clients (you need to test with at least 2 clients)

- Join 2 clients custom loadout > All gear OK

- JIP 1 client > gear sometimes OK, sometimes items missing. Depends on script load times, server FPS etc. Seems to be okay the one time and not okay the other time...

- Respawn 1 client > defaulted back to ARMA3 role assigned gear.

You are correct re the locality issue you menioned in your posts before. But the issue lies with Arma, not with incorrect scripting. addUniform is local whereas removeUniform is Global. Please see this link: http://feedback.arma3.com/view.php?id=15298 (and vote up please :))

Please note the comment from BIS developer japapatramtara on 28 Nov: "well.. I see.. it is really broken :-( now I'm having a not so funny vision.. a vision in which I will work even over the weekend.. again :-) "

Share this post


Link to post
Share on other sites

I think you're a troll lol. In the below quote, with the same script example, you claim that you are infact respawning with the weapons you had when you died (when no such script even existed in the first place :rolleyes:)... a bit contradictory of what you're saying now lol.

Hey Iceman, the respawn function only works partly. I am greatful we have a solution where players can JIP and respawn with their clothes on :) ... but you respawn with the loadout you had when you died. E.g. if you would have picked up an enemy weapon, you'll respawn with that weapon.
Edited by Iceman77

Share this post


Link to post
Share on other sites

No need for name calling. Just trying to point something out. And no, my first post was in regards to a different mission I did. Myself and others found out that respawn only works if you use default uniforms. And yes, I did respawn with an entire different weapon.

Based on that I decided to do further testing and figure out what really is the issue. I guess now we know ... http://feedback.arma3.com/view.php?id=15298

Share this post


Link to post
Share on other sites

Sorry about that, it was just kind of funny how you contradicted yourself as both comments were in regards to the example mission I posted. Scroll up a bit to post #107 and you'll see your initial post is infact in regards to the example mission I'd posted...

Anyhow, the command isn't global. So give the unit the uniform with BIS_FNC_MP to sync the clients. I fail to see how this is a "bug" or an "issue". If they want to make the command global (as it should be) then that's great. Otherwise, you'll need to work around the fact that the command isn't global.

Edited by Iceman77

Share this post


Link to post
Share on other sites

Thank you, everyone, for replying and discussing this. It's a matter that really had me struggling. I somehow managed to have it work in the past, but I had to change and improve the methods used, which is always a good thing.

[...]

...but this one will work...

[[player, {_this addUniform "U_I_CombatUniform"}], "BIS_fnc_spawn", true] call BIS_fnc_MP;

I've yet to test this in dedicated, my community's been a bit slower with the holidays, but I could only get no errors and the intended result with the following syntax:

[[{}, _unit addUniform "Uniform Classname"], "BIS_fnc_spawn", true] call BIS_fnc_MP;

Share this post


Link to post
Share on other sites

Hello Mr Iceman77,

I have a small coop mission on this server "-=IBS=- Inglorious Bastard Squad Tactical Realism Domination Server" mission name KSK Domination Server (Altis). File is only 234kB. Check it out please, run this mission in single player on your machine, then MP player on your machine and then go back to the server and run it.......you will see what happens.

There is a problem within Arma 3 sorry to say.

I already changed the players so that they are the original for that uniform. So I don't have to use the adduniform function. But pay close attention to player loadout.

Here is my Player1 loadout file:

waitUntil {!isNull player}; //to prevent MP / JIP issues

_unit = _this select 0;

removeallassigneditems _unit;

removeallweapons _unit;

removebackpack _unit;

removevest _unit;

removeGoggles _unit;

// Headgear, Uniform & Vest

_unit addheadgear "H_Watchcap_blk";

_unit addvest "V_BandollierB_Blk";

// Trinkets

_unit additem "ItemRadio";

_unit additem "Itemmap";

_unit additem "ItemCompass";

_unit additem "itemwatch";

_unit assignitem "ItemRadio";

_unit assignitem "Itemmap";

_unit assignitem "ItemCompass";

_unit assignitem "itemwatch";

// weapons, attatchments & ammo

_unit addweapon "Binocular";

// ETXTRA Commands

_unit addbackpack "B_AssaultPack_mcamo";

if(true) exitWith{};

I have this code in player init:

null = [this] execVM "Player1.sqf";

So as you can see I want the player to init with only uniform, vest, headgear and some items. Definitely with no weapons. But when I play mission on dedicated server they spawn with the weapon and one magazine.

Before the last update I had no problems with loadouts. I try to use only in game items and no addons keep the missions pure.

Please Help

Thanks

Jaeger

Edited by JaegerMeister
adding more info

Share this post


Link to post
Share on other sites

Sounds like it's rerunning all the soldier's init lines upon player jip. Idk though, I've never loadout players via their init lines. In any case, it sucks some people are having this problem. We're so fortunate to not have any of these problems. Regards, Iceman77.

Share this post


Link to post
Share on other sites

So the question remains who can help us with this issue since it is very real for us. I hate to pay for a dedicated Arma 3 Server and can't even run a simple small Domination mission on it.

Iceman77 who can we talk to ..... to solve this?

Thanks Jaeger

Share this post


Link to post
Share on other sites

Bis need to solve this issue, for example we are enable to change the uniform while we're using LEA (you will see player with their underwear...).

Share this post


Link to post
Share on other sites

Hello,

I find few things in other topics and this one, and i have something that seems working for server host (not dedicated server):

- respawn seems OK with the custom loadouts

- no problem with uniform

Custom loadouts: assault_long.sqf

//waitUntil {!isNull player};

_unit = _this select 0;

If (local _unit) then {

// removeallassigneditems _unit;

removeallcontainers _unit;

removeallweapons _unit;

removebackpack _unit;

removeuniform _unit;

removevest _unit;

// Headgear, Uniform & Vest

_unit adduniform "U_B_CTRG_3";

_unit addbackpack "B_BergenC_grn";

_unit addvest "V_TacVest_oli";

_unit addheadgear "H_mas_uk_HelmetB_paint";

_unit addGoggles "G_Tactical_Clear";

// Trinkets

_unit additem "NVGoggles";

_unit assignitem "NVGoggles";

_unit additem "B_UavTerminal";

_unit assignitem "B_UavTerminal";

_unit addmagazine "Laserbatteries";

_unit addweapon "Laserdesignator";

// Kit

_unit additem "FirstAidKit";

_unit additem "FirstAidKit";

_unit additem "FirstAidKit";

_unit additem "FirstAidKit";

// GRENADES

_unit addmagazines ["handGrenade",4];

_unit addMagazines ["DemoCharge_Remote_Mag", 2];

// WEAPONS

_unit addmagazine "20Rnd_mas_762x51_Stanag";

_unit addWeapon "srifle_mas_sr25_sd";

_unit addPrimaryWeaponItem "optic_Nightstalker";

_unit addPrimaryWeaponItem 'optic_Nightstalker';

(unitBackpack _unit) addMagazineCargoGlobal ["20Rnd_mas_762x51_Stanag",22];

_unit addmagazine "12Rnd_mas_45acp_Mag";

_unit addmagazine "12Rnd_mas_45acp_Mag";

_unit addmagazine "12Rnd_mas_45acp_Mag";

_unit addWeapon "hgun_mas_glocksf_F_sd";

};

//if(true) exitWith{};

And in the INIT of the player (no name):

null = [this] execVM "scripts\assault_long.sqf"; this addeventhandler ["respawn","_this execVM 'scripts\assault_long.sqf'"];

(and of course, the marker respawn_west and a description.ext)

Share this post


Link to post
Share on other sites
Hello,

I find few things in other topics and this one, and i have something that seems working for server host (not dedicated server):

- respawn seems OK with the custom loadouts

- no problem with uniform

Custom loadouts: assault_long.sqf

//waitUntil {!isNull player};

_unit = _this select 0;

If (local _unit) then {

// removeallassigneditems _unit;

removeallcontainers _unit;

removeallweapons _unit;

removebackpack _unit;

removeuniform _unit;

removevest _unit;

// Headgear, Uniform & Vest

_unit adduniform "U_B_CTRG_3";

_unit addbackpack "B_BergenC_grn";

_unit addvest "V_TacVest_oli";

_unit addheadgear "H_mas_uk_HelmetB_paint";

_unit addGoggles "G_Tactical_Clear";

// Trinkets

_unit additem "NVGoggles";

_unit assignitem "NVGoggles";

_unit additem "B_UavTerminal";

_unit assignitem "B_UavTerminal";

_unit addmagazine "Laserbatteries";

_unit addweapon "Laserdesignator";

// Kit

_unit additem "FirstAidKit";

_unit additem "FirstAidKit";

_unit additem "FirstAidKit";

_unit additem "FirstAidKit";

// GRENADES

_unit addmagazines ["handGrenade",4];

_unit addMagazines ["DemoCharge_Remote_Mag", 2];

// WEAPONS

_unit addmagazine "20Rnd_mas_762x51_Stanag";

_unit addWeapon "srifle_mas_sr25_sd";

_unit addPrimaryWeaponItem "optic_Nightstalker";

_unit addPrimaryWeaponItem 'optic_Nightstalker';

(unitBackpack _unit) addMagazineCargoGlobal ["20Rnd_mas_762x51_Stanag",22];

_unit addmagazine "12Rnd_mas_45acp_Mag";

_unit addmagazine "12Rnd_mas_45acp_Mag";

_unit addmagazine "12Rnd_mas_45acp_Mag";

_unit addWeapon "hgun_mas_glocksf_F_sd";

};

//if(true) exitWith{};

And in the INIT of the player (no name):

null = [this] execVM "scripts\assault_long.sqf"; this addeventhandler ["respawn","_this execVM 'scripts\assault_long.sqf'"];

(and of course, the marker respawn_west and a description.ext)

Im still having problems. Im hosting a game iv made and my friend is playing. It just seems to be the uniforms at the moment.

Heres my loadout.sqf

TAG_FNC_Rifleman =

{

_unit = _this select 0;

removeAllWeapons _unit;

removeHeadgear _unit;

removeVest _unit;

removeBackPack _unit;

_unit unassignItem "NVGoggles";

_unit removeItem "NVGoggles";

_unit addHeadgear "H_Beret_grn";

_unit addVest "V_PlateCarrier1_rgr";

_Unit addBackPack "B_Kitbag_mcamo";

_unit addWeapon "rangefinder";

_unit addWeapon "itemGps";

(unitBackpack _unit) addMagazineCargo ["smokeshell",1];

(unitBackpack _unit) addMagazineCargo ["HandGrenade",3];

(unitBackpack _unit) addMagazineCargo ["Chemlight_blue",5];

(unitBackpack _unit) addMagazineCargo ["Chemlight_Green",5];

(unitBackpack _unit) addMagazineCargo ["Chemlight_Yellow",5];

[_unit, "arifle_MX_F" ,10 ,"30Rnd_65x39_caseless_mag"] call BIS_fnc_addWeapon;

[_unit, "hgun_pistol_heavy_01_F" ,6 ,"11Rnd_45ACP_Mag"] call BIS_fnc_addWeapon;

_unit addPrimaryWeaponItem "optic_Hamr";

_unit addPrimaryWeaponItem "acc_pointer_IR";

};

TAG_FNC_Marksman =

{

_unit = _this select 0;

removeAllWeapons _unit;

removeHeadgear _unit;

removeVest _unit;

removeBackPack _unit;

_unit unassignItem "NVGoggles";

_unit removeItem "NVGoggles";

_unit addHeadgear "H_Booniehat_khk";

_unit addVest "V_TacVest_brn";

_Unit addBackPack "B_Kitbag_mcamo";

_unit addWeapon "rangefinder";

_unit addWeapon "itemGps";

(unitBackpack _unit) addMagazineCargo ["smokeshell",1];

(unitBackpack _unit) addMagazineCargo ["HandGrenade",3];

(unitBackpack _unit) addMagazineCargo ["Chemlight_blue",5];

(unitBackpack _unit) addMagazineCargo ["Chemlight_Green",5];

(unitBackpack _unit) addItemCargo ["FirstAidKit",5];

[_unit, "srifle_DMR_01_DMS_F" ,10 ,"10Rnd_762x51_Mag"] call BIS_fnc_addWeapon;

[_unit, "hgun_pistol_heavy_01_F" ,6 ,"11Rnd_45ACP_Mag"] call BIS_fnc_addWeapon;

_unit addPrimaryWeaponItem "acc_pointer_IR";

};

TAG_FNC_Sniper =

{

_unit = _this select 0;

removeAllWeapons _unit;

removeHeadgear _unit;

removeVest _unit;

removeUniform _unit;

removeBackPack _unit;

_unit unassignItem "NVGoggles";

_unit removeItem "NVGoggles";

_unit addHeadgear "H_Booniehat_khk";

_unit addUniform "U_B_GhillieSuit";

_unit addVest "V_TacVest_brn";

_Unit addBackPack "B_Kitbag_mcamo";

_unit addWeapon "rangefinder";

_unit addWeapon "itemGps";

(unitBackpack _unit) addMagazineCargo ["smokeshell",1];

(unitBackpack _unit) addMagazineCargo ["HandGrenade",3];

(unitBackpack _unit) addMagazineCargo ["Chemlight_blue",5];

(unitBackpack _unit) addMagazineCargo ["Chemlight_Green",5];

(unitBackpack _unit) addMagazineCargo ["Chemlight_Yellow",5];

[_unit, "srifle_LRR_F" ,10 ,"7Rnd_408_Mag"] call BIS_fnc_addWeapon;

[_unit, "hgun_pistol_heavy_01_F" ,6 ,"11Rnd_45ACP_Mag"] call BIS_fnc_addWeapon;

_unit addPrimaryWeaponItem "acc_pointer_IR";

_unit addPrimaryWeaponItem "optic_SOS";

};

TAG_FNC_Medic =

{

_unit = _this select 0;

removeAllWeapons _unit;

removeHeadgear _unit;

removeVest _unit;

removeUniform _unit;

removeBackPack _unit;

_unit unassignItem "NVGoggles";

_unit removeItem "NVGoggles";

_unit addHeadgear "H_Beret_grn";

_unit addUniform "U_B_CombatUniform_mcam";

_unit addVest "V_TacVest_brn";

_Unit addBackPack "B_Kitbag_mcamo";

_unit addWeapon "rangefinder";

_unit addWeapon "itemGps";

(unitBackpack _unit) addMagazineCargo ["smokeshell",1];

(unitBackpack _unit) addMagazineCargo ["HandGrenade",3];

(unitBackpack _unit) addMagazineCargo ["Chemlight_blue",5];

(unitBackpack _unit) addMagazineCargo ["Chemlight_Green",5];

(unitBackpack _unit) addItemCargo ["FirstAidKit",10];

[_unit, "arifle_MX_F" ,10 ,"30Rnd_65x39_caseless_mag"] call BIS_fnc_addWeapon;

[_unit, "hgun_pistol_heavy_01_F" ,6 ,"11Rnd_45ACP_Mag"] call BIS_fnc_addWeapon;

_unit addPrimaryWeaponItem "optic_Hamr";

_unit addPrimaryWeaponItem "acc_pointer_IR";

};

TAG_FNC_AutoRifleMan =

{

_unit = _this select 0;

removeAllWeapons _unit;

removeHeadgear _unit;

removeVest _unit;

removeUniform _unit;

removeBackPack _unit;

_unit unassignItem "NVGoggles";

_unit removeItem "NVGoggles";

_unit addHeadgear "H_Cap_tan";

_unit addUniform "U_B_CombatUniform_mcam";

_unit addVest "V_TacVest_brn";

_Unit addBackPack "B_Kitbag_mcamo";

_unit addWeapon "rangefinder";

_unit addWeapon "itemGps";

(unitBackpack _unit) addMagazineCargo ["smokeshell",1];

(unitBackpack _unit) addMagazineCargo ["HandGrenade",3];

(unitBackpack _unit) addMagazineCargo ["Chemlight_blue",5];

(unitBackpack _unit) addMagazineCargo ["Chemlight_Green",5];

(unitBackpack _unit) addMagazineCargo ["Chemlight_Yellow",5];

[_unit, "LMG_Mk200_MRCO_F" ,10 ,"200Rnd_65x39_cased_Box"] call BIS_fnc_addWeapon;

[_unit, "hgun_pistol_heavy_01_F" ,6 ,"11Rnd_45ACP_Mag"] call BIS_fnc_addWeapon;

_unit addPrimaryWeaponItem "acc_pointer_IR";

_unit addPrimaryWeaponItem "optic_Arco";

};

Calllds.sqf

If (!IsDedicated) Then {

waitUntil { !IsNull Player };

if (local player) then {

waitUntil { time > 1 };

switch (faction player) do {

case "BLU_F":{[] call compile preprocessFile "loadouts.sqf";};

};

[unit1] call TAG_FNC_Rifleman; // then call a loadout now, for example

[unit2] call TAG_FNC_Marksman; // then call a loadout now, for example

[unit3] call TAG_FNC_Sniper; // then call a loadout now, for example

[unit4] call TAG_FNC_Medic; // then call a loadout now, for example

[unit5] call TAG_FNC_AutoRifleman; // then call a loadout now, for example

};

};

};

};

};

};

Each player has this in their init

null = [this] execVM "CallLDS.sqf";

this addeventhandler ["respawn","_this execVM "CallLDS.sqf'"];

any help plz

---------- Post added at 16:42 ---------- Previous post was at 16:11 ----------

https://www.dropbox.com/s/s9jznow9ml8ujo9/Arma.zip

Share this post


Link to post
Share on other sites

I think something official should be done by the devs , bug or not I dont know but we are talking about making custom gear soldiers , should be a basic and easy thing to do ...

They can add more modules and stuff to make the editor more easy to use but then if you are not able to do a basic thing like soldiers with custom gear ..

The custom gears and inventory system was one of the core elements of this Arma III and now in the editor there are too many problems to make it work .

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×