RHS Feedback - USAF
View Issue Details
0005572USAFGeneralpublic2020-04-03 14:132020-04-04 18:09
ranger024 
reyhard 
noneminorrandom
closedno change required 
 
 
Yes
Stable
1.96
Yes
ACE3, CBA, official unit modpack
0005572: G3 uniforms and customized insignias texture collision
While testing our unit's new and customized insignias we created, the insignias seem to be colliding with the textures of the shoes of the G3 uniforms - sometimes the insignias "replace" the shoe texture, sometimes they disappear entirely.

https://imgur.com/a/P8oegxt [^]

Also, this issue randomly changes when respawning. Meaning, when first starting the mission the insignias appear fine. After respawning at least once, the texture issue appears. Sometimes when respawning the third time, it gets fixed but then collides again.
No tags attached.
Issue History
2020-04-03 14:13ranger024New Issue
2020-04-03 14:33reyhardNote Added: 0010455
2020-04-03 14:33reyhardAssigned To => reyhard
2020-04-03 14:33reyhardStatusnew => feedback
2020-04-03 15:07ranger024Note Added: 0010456
2020-04-03 15:07ranger024Statusfeedback => new
2020-04-03 15:31reyhardNote Added: 0010457
2020-04-03 15:31reyhardStatusnew => feedback
2020-04-03 20:11ranger024Note Added: 0010458
2020-04-03 20:11ranger024Statusfeedback => new
2020-04-03 20:33reyhardNote Added: 0010459
2020-04-03 20:33reyhardStatusnew => feedback
2020-04-03 21:12ranger024Note Added: 0010460
2020-04-03 21:12ranger024Statusfeedback => new
2020-04-03 22:18reyhardNote Added: 0010461
2020-04-03 22:18reyhardStatusnew => feedback
2020-04-03 22:36ranger024Note Added: 0010462
2020-04-03 22:36ranger024Statusfeedback => new
2020-04-03 22:42reyhardNote Added: 0010463
2020-04-03 22:42reyhardStatusnew => feedback
2020-04-03 22:59ranger024Note Added: 0010464
2020-04-03 22:59ranger024Statusfeedback => new
2020-04-04 09:54reyhardNote Added: 0010467
2020-04-04 09:54reyhardStatusnew => feedback
2020-04-04 17:14ranger024Note Added: 0010468
2020-04-04 17:14ranger024Statusfeedback => new
2020-04-04 18:09reyhardNote Added: 0010469
2020-04-04 18:09reyhardStatusnew => closed
2020-04-04 18:09reyhardResolutionopen => no change required

Notes
(0010455)
reyhard   
2020-04-03 14:33   
Is it happening with only RHS launched?
(0010456)
ranger024   
2020-04-03 15:07   
Yes, we tried all combinations of loading mods:
1. All other mods but without RHS
2. Only RHS
3. Vanilla only

The insignias work well on vanilla uniforms. The issue happens specifically on the G3 uniforms.
(0010457)
reyhard   
2020-04-03 15:31   
And how are you respawning? Are you using some vanilla function?
(0010458)
ranger024   
2020-04-03 20:11   
The only custom thing that happens on respawn is we listen to the respawn event and we run a script that assigns the insignias.
(0010459)
reyhard   
2020-04-03 20:33   
I guess script is fault then? Could you share it perhaps?
(0010460)
ranger024   
2020-04-03 21:12   
Of course. Here is the script that defines which insignia to give to each player by their Steam UID:

/* United States Players Array */
usPlayers = ["76561198002438570"];

/* Israel Players Array */
ilPlayers = ["76561198065837037"];

{

  if((getPlayerUID _x) in usPlayers) then
  {
    _x setObjectTextureGlobal [3, "\tfwp_insignias\data\us_flag.paa"];
  };

  if((getPlayerUID _x) in ilPlayers) then
  {
    _x setObjectTextureGlobal [3, "\tfwp_insignias\data\il_flag.paa"];
  };

} forEach allPlayers;



And here is the script of the event handler that enables it on respawn:

/////////////////////////////////////////////////////////////////
//////// Initialize The Insignia Arrays Handler Script /////////
addMissionEventHandler ["EntityRespawned",
{
    params ["_entity", "_corpse"];
    execVM "tfwp_scripts\insignias\flag_insignias.sqf";
}];
(0010461)
reyhard   
2020-04-03 22:18   
How is that script initialized?
(0010462)
ranger024   
2020-04-03 22:36   
We have two files:

The first script block is in a file called "flag_insignia.sqf".

Then, the second script block is what initialized in-game and is in a file called "initServer.sqf".
(0010463)
reyhard   
2020-04-03 22:42   
so is setobjectTextureGlobal working fine for you?
(0010464)
ranger024   
2020-04-03 22:59   
It works fine at the start of the mission, but after at least one respawn you can't see the insignias of the other players and vise versa.
(0010467)
reyhard   
2020-04-04 09:54   
do you have script console enabled? Did you tried i.e. executing in console i.e.
cursorObject setObjectTextureGlobal [3, "\tfwp_insignias\data\il_flag.paa"]; or getObjectTextures cursorObject to see, what textures are applied? I tried it on dedicated server + 2 clients and couldn't reproduce this issue although I was using bit different method for ID differentiation (_foreachindex) since obviously all my clients had same steam ID.
(0010468)
ranger024   
2020-04-04 17:14   
We tried cursorObject setObjectTextureGlobal [3, "\tfwp_insignias\data\il_flag.paa"]; and it works.

Then after a couple of respawns my friend couldn't see my insignia anymore, but I could see mine and his as well, so he tried getObjectTextures cursorObject on my playable unit and it returned:

["rhsusf\addons\rhsusf_infantry2\data\gen3_rgr_co.paa","rhsusf\addons\rhsusf_infantry2\data\merrells_co.paa","rhsusf\addons\rhsusf_infantry2\data\mechanix_green_co.paa",""]

The fourth element (index 3) in the array is the insignia one and it's returned empty.

When he could see my insignia, it returned:

["rhsusf\addons\rhsusf_infantry2\data\gen3_rgr_co.paa","rhsusf\addons\rhsusf_infantry2\data\merrells_co.paa","rhsusf\addons\rhsusf_infantry2\data\mechanix_green_co.paa","tfwp_insignias\data\us_flag.paa"]
(0010469)
reyhard   
2020-04-04 18:09   
Okay, that sounds like a script issue, not asset one. I would recommend you to head to forum or discord i.e.
https://forums.bohemia.net/forums/forum/154-arma-3-mission-editing-scripting/ [^]

Main issue that I see is fact that server is applying textures to all players everytime someone respawns. setObjectTextureGlobal is transmitting change to all clients so I guess network is spammed with unnecessary data. This, plus fact you are using spawned script (execVM is spawning code, either call or putting whole code in EH could help there), might result in such desync.