Page MenuHomeFeedback Tracker

ForceAddUniform not working on all uniform classes
New, WishlistPublic

Description

According to my understanding of the BIKI entry

unit forceadduniform "classname";

should force the unit to wear the uniform even if their faction isn't allowed to wear it.

This does not work on some classnames of uniforms

Details

Legacy ID
2946504695
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. Create a simple mission
  2. Add an AI Rifleman unit from the Indepenant FIA faction
  3. Name it R1

run the following code from the INIT.sqf

_uniforms=

     [
                    "U_C_Commoner2_1"       ,
                    "U_C_Commoner2_2"       ,
                    "U_C_Commoner2_3"       ,
                    "U_C_Scavenger_1"       ,
                    "U_C_Scavenger_2"       ,
                    "U_C_Farmer"            ,
                    "U_C_Fisherman"         ,
                    "U_C_WorkerOveralls"    ,
                    "U_C_HunterBody_brn"    ,
                    "U_C_FishermanOveralls" ,
                    "U_C_PriestBody"        ,
                    "U_C_Poor_shorts_2"  
     ];

{

     sleep 3;
     R1  forceadduniform _x;
     Player globalchat format ["Unif: %1 -- IsClass %2", _x, (IsClass(configFile >> "cfgWeapons" >> _x))];

}foreach _uniforms;

-----------------------------------------------------------------------------------------------------------

The unit will appear in underwear when attempting to add the uniform For each of the uniform classes listed in the _uniform array

The following civilian class uniforms all work okay
_Uniforms=

            [

                "U_C_Poor_2"                ,
                "U_C_Poloshirt_blue"        ,
                "U_C_Poloshirt_burgundy"    ,
                "U_C_Poloshirt_stripped"    ,
                "U_C_Poloshirt_tricolour"   ,
                "U_C_Poloshirt_salmon"      ,
                "U_C_Poloshirt_redwhite"    ,
                "U_C_WorkerCoveralls"       ,
                "U_C_HunterBody_grn"        ,
                "U_C_Poor_shorts_1"         ,
                "U_C_Commoner_shorts"
            ];
Additional Information

I have only attempted to do this with the classnames listed and with that 1 Indepenandnt FIA Rifleman class

Event Timeline

Terox edited Steps To Reproduce. (Show Details)Jun 18 2014, 6:51 PM
Terox edited Additional Information. (Show Details)
Terox set Category to Scripting.
Terox set Reproducibility to Always.
Terox set Severity to None.
Terox set Resolution to Open.
Terox set Legacy ID to 2946504695.May 7 2016, 6:46 PM
Bohemia added a subscriber: AD2001.Jun 18 2014, 6:51 PM

Those uniforms do not work with civilian units either. My bet is on those uniforms being misconfigured or not finished rather than on broken command.