Jump to content
Dzou Sisohvat

BIS_fnc_setUnitInsignia multiplayer problem

Recommended Posts

I am asking this instead of my fellow clan member who has the problem. He still doesn't have the right to post new content, so I am helping him.

 

In a custom made mission I have included custom unit insignias that are being called at player respawn. Insignia works for every player locally (everyone sees their own patch on the shoulder), but the problem is that other players sometimes can't see them. Sometimes it works, sometimes it doesn't, it seems pretty random.

 

In "onPlayerRespawn.sqf" i wrote:

[player] execVM "scripts\loadout\loadout.sqf"

in "loadout.sqf" i wrote:

_unit = _this select 0;

comment "Remove existing items";
removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems _unit;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;

comment "Add containers";
_unit forceAddUniform "U_DMan_CA_CombatUniform_Wdl";
for "_i" from 1 to 5 do {_unit addItemToUniform "ACE_fieldDressing";};
for "_i" from 1 to 5 do {_unit addItemToUniform "ACE_packingBandage";};
for "_i" from 1 to 5 do {_unit addItemToUniform "ACE_morphine";};
_unit addItemToUniform "ACE_tourniquet";
for "_i" from 1 to 5 do {_unit addItemToUniform "ACE_elasticBandage";};
for "_i" from 1 to 5 do {_unit addItemToUniform "ACE_quikclot";};
_unit addItemToUniform "ACE_MapTools";
_unit addItemToUniform "ACE_Flashlight_XL50";
_unit addItemToUniform "ACE_DAGR";
_unit addItemToUniform "ACE_EarPlugs";
for "_i" from 1 to 2 do {_unit addItemToUniform "Chemlight_green";};
_unit addItemToUniform "Laserbatteries";
_unit addVest "V_DMan_CA_PlateCarrier1_Wdl";
for "_i" from 1 to 6 do {_unit addItemToVest "30Rnd_65x39_caseless_mag";};
for "_i" from 1 to 2 do {_unit addItemToVest "11Rnd_45ACP_Mag";};
for "_i" from 1 to 2 do {_unit addItemToVest "HandGrenade";};
for "_i" from 1 to 2 do {_unit addItemToVest "SmokeShell";};
for "_i" from 1 to 2 do {_unit addItemToVest "SmokeShellGreen";};
_unit addBackpack "tf_rt1523g_big_rhs";
for "_i" from 1 to 2 do {_unit addItemToBackpack "B_IR_Grenade";};
for "_i" from 1 to 3 do {_unit addItemToBackpack "SmokeShellGreen";};
for "_i" from 1 to 3 do {_unit addItemToBackpack "SmokeShell";};
for "_i" from 1 to 3 do {_unit addItemToBackpack "SmokeShellRed";};
_unit addHeadgear "H_DMan_CA_HelmetSpec_Wdl";
_unit addGoggles "G_Tactical_Clear";

comment "Add weapons";
_unit addWeapon "arifle_MX_Black_F";
_unit addPrimaryWeaponItem "muzzle_snds_H";
_unit addPrimaryWeaponItem "ACE_acc_pointer_green";
_unit addPrimaryWeaponItem "optic_Hamr";
_unit addWeapon "hgun_Pistol_heavy_01_F";
_unit addHandgunItem "optic_MRD";
_unit addWeapon "Laserdesignator";

comment "Add items";
_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit linkItem "tf_microdagr";
_unit linkItem "tf_anprc152_3";
_unit linkItem "ACE_NVG_Wide";

comment "Set identity";
[_unit,"Mrljavci"] call bis_fnc_setUnitInsignia;

in "description.ext"

class CfgUnitInsignia
{
	class Mrljavci
	{
		displayName = "9. mrcinaÄki vod Mrljavci";
		author = "*NOB* Prpa";
		texture = "media\insignia.paa";
		textureVehicle = "";
	};
	
	class Delta
	{
		displayName = "Delta Force";
		author = "*NOB* Prpa";
		texture = "media\delta.paa";
		textureVehicle = "";
	};
};

The question is - Why does it happen, and how to fix it?

 

Share this post


Link to post
Share on other sites

I am member in question, thank you for posting.

Everything is in first post, anyone can help?

Share this post


Link to post
Share on other sites

Have noticed it also, both with Base patches and modded ones. As they said, sometimes show, sometimes don't. Tried with remoteExec but no change in result.

Share this post


Link to post
Share on other sites

Does this work if you are not using any mods?

 

Nope, same problem again.

 

P.S. Love your blog, it's great source of informations. Read it all though didn't understand half of it :)

Share this post


Link to post
Share on other sites

understood half of it :)

 

Ha!  You're doing pretty well then. :)

  • Like 1

Share this post


Link to post
Share on other sites

Ha!  You're doing pretty well then. :)

 

Haha I wish. Sadly, it's just an expression :(

Share this post


Link to post
Share on other sites

Im having this issue as well. 

I've used this in missions description.ext file:

class CfgUnitInsignia
{
class NRFID
{
displayName = "NATO RESPONSE FORCE";
author = "Ulfgaar";
texture = "NRF.paa";
textureVehicle = "";
};
};

I've produced the .paa image file, which is stored in the missions folder - and then i use this in the units init field:

[this,"NRFID"] call BIS_fnc_setUnitInsignia;

When i test it localy from the editor, the unit i control shows the patch, as well as all AI units that are supposed to have it. When i test it in multiplayer from the editor, everything is as it should be as well. But when i export it as an multiplayer file and test it on my dedicated server - it does not work. No patches show up at all, not on the one i control, nor on any of the AI's that should have it. 

Im just at a loss here - so if anyone finds a solution for this, i'd like to know. 

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

×