Jump to content
Sign in to follow this  
enad

Help with units appearing naked in multiplayer

Recommended Posts

Hey there guys.

I've been having a lot of trouble lately in some missions I've created and I've looked around for solution on my own but I can't find anything. Maybe someone here can assist.

So there are actually 2 issues I'm having but the main one is that certain(modded) units are appearing naked in Multiplayer, but function fine when testing in the editor. These units are ones that make use of ArmA 3's new randomize gear thing. The mods are Middle East Irregulars and PG PMC's. In the editor, these units have randomized gear each time they're spawned. I guess that's good for variety, but in MP it makes them appear naked. It's a problem as both of these units play a big part in a campaign I've been creating.

Now I figure, for the Irregulars, I can add some stock guerilla clothing to them and achieve a very similar appearance, but I have dozens of them on each mission so it would be very time consuming and frankly I'd rather find a fix because replicating what the PMC units wear will not be possible really.

So, has any one ever encountered this? Does anyone know of a fix?

The second issue is similar. Whenever using the adduniform script, all players lose their uniform if one person is killed(I don't think it happens when the host dies though). This is very jarring as you lose all ammo stored in your uniform and you just look ridiculous, losing any immersion you had in that mission. Clearly the issue is because of the adduniform script, and while it's avoidable(by not dying), it would be nice to know if there's something I can do to prevent it from happening, as I have custom uniforms for all the playable units in the campaign I'm making, on almost every mission.

So there you have it. These are 2 major issues I've been having and cannot seem to fix. The former is much more important to me. I really need to get that fixed.

Any help would be appreciated!

Share this post


Link to post
Share on other sites

The addUniform command is bugged since alpha. The problem is that, unlike addVest and addBackpack, addUniform isn't global. So the players old uniform gets removed on all clients but because adduniform isn't global the new uniform only gets added on the machine that executes the addUniform command. A workaround would be to execute the addUniform command on all clients.

Share this post


Link to post
Share on other sites

Ok so that's for my second issue. How would I execute addUniform for all clients?

Do you know anything about the first issue? That's not addUniform related, because I"m not using it on them. Like I said, they're modded and they seem to use some new BIS feature of randomized gear.

Share this post


Link to post
Share on other sites

Maybe this randomizing feature also calls addUniform

You could use BIS_fnc_MP for this task. This is the only way i can think of... but it could turn out bad performance wise.

Example:

fn_addUniformGlobal.sqf

player addUniform _this;

init.sqf

TAG_fnc_addUniformGlobal = compileFinal preprocessFileLineNumbers "fn_addUniformGlobal.sqf";

Actuall function call

["uniform_classname", TAG_fnc_addUniformGlobal, true, true] call BIS_fnc_MP

Share this post


Link to post
Share on other sites

And what exactly would this do?

I only have/want custom uniforms on 3 units.

I'm not very scrip savvy so I'm curious to what all that would accomplish?

Share this post


Link to post
Share on other sites

The 3rd code block is calling BIS_fnc_MP that is executing TAG_fnc_addUniformGlobal (be sure to change "uniform_classname" to the actual classname of the uniform).

TAG_fnc_addUniformGlobal is a function defined in the init.sqf that loads the fn_addUniformGlobal.sqf script.

fn_addUniformGlobal.sqf just adds the uniform you defined in the BIS_fnc_MP call.

Share this post


Link to post
Share on other sites

Alright so I should put the init.sqf and fn_addunitblahblah.sqf into the mission folder. Where does the actual function call go?

And this is all that comes to mind for a possible solution to the randomize gear? I was hoping someone knew of the script, and could possibly disable it. If that's possible, it seems like the easiest route.

Any clue why this stuff happens only in multiplayer?

Share this post


Link to post
Share on other sites

Whenever you want to use the addUniform command use the BIS_fnc_MP call instead.

Like I said it is probably using the addUniform command.... and since it isn't global it doesn't work in multiplayer

Share this post


Link to post
Share on other sites

So strange.

I'll try it.

You mentioned it could cause poor performance, why is that?

At this point, if your technique doesn't work. I'm just going to try to replace the units with different modded units. They're high quality but it's a shame they don't work in MP scenarios.

Share this post


Link to post
Share on other sites

Because it sends a message to all clients and does it also for JIP players... If you use other functions like this, have a high player connecting rate or call this script too often it might cause some issues

If you run into annoying slowdowns when a player connects you might want to look into creating a custom JIP script

Share this post


Link to post
Share on other sites

These missions are only 3 player missions, that shouldn't cause a serious slow down right?

Share this post


Link to post
Share on other sites

if you use:

["uniform_classname", TAG_fnc_addUniformGlobal, true, true] call BIS_fnc_MP

in the call, you are going the send the whole function code over the network, too.

use:

["uniform_classname", "TAG_fnc_addUniformGlobal", true, true] call BIS_fnc_MP

to only send the name of the, to calling function!

greetings Na_Palm

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
Sign in to follow this  

×