Jump to content
ahmedslimkw

How to randomize uniforms + headgears?

Recommended Posts

Hello all!

 

So i searched and found nothing other than scripts ingame which isn't the thing i need like randomizing uniform.

 

Is there a possibility for uniforms + headgears to be randomized? Im trying to give the uniforms 50% chance to spawn instead of me having to create multiple units.

 

The uniforms that i tried to find a way to randomize onto a unit (im so confused trying to explain this) are:

 

U_Vory_Apparel_Blk, U_Vory_Apparel_Wht, U_Vory_Apparel_Red and U_Vory_Apparel_Gry

 

here is my config for the unit i need to be randomized:

    class Vory_Soldier: B_soldier_F {
        author = "Velocity-Overdrive"; 
        _generalMacro = "B_soldier_F"; 
        scope = 2; 
        displayName = "Zhukov"; 
        identityTypes[] = {"Zhukov"}; 
        genericNames = "NATOMen"; 
        faction = "Vory_V_Zakone";
        model = "\Vory_V_Zakone\Uniforms\Suit.p3d"; 
        uniformClass = "Vory_Outfit_Blk"; 
        hiddenSelections[] = {"Camo"}; 
        hiddenSelectionsTextures[] = {"\Vory_V_Zakone\Uniforms\Data\U_Vory_Apparel_Blk_co.paa"}; 
        hiddenSelectionsMaterials[] = {"\Vory_V_Zakone\Uniforms\Data\U_suit.rvmat"}; 
        weapons[] = {"Throw","Put"}; 
        respawnWeapons[] = {"Throw","Put"}; 
        magazines[] = {""}; 
        respawnMagazines[] = {""};
        linkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"}; 
        respawnLinkedItems[] = {"ItemMap","ItemCompass","ItemWatch","ItemRadio"}; 
    };

Hopefully there is a solution to this problem! Pardon me if this was confusing as i didn't really know how to explain it.

 

Thanks!

Share this post


Link to post
Share on other sites

I dont think you can randomize uniforms. What you can do however is to attach an init script to the unit, which you can use to swap uniforms on the unit randomly

  • Like 1

Share this post


Link to post
Share on other sites

I dont think you can randomize uniforms. What you can do however is to attach an init script to the unit, which you can use to swap uniforms on the unit randomly

That's a shame, guess that will do! Thankfully I can randomize headgear after more extensive research.

Thanks!

Share this post


Link to post
Share on other sites

Just add a script connect to the config so when the unit spawn run a code that will select the gear random

 

something like this for the code

 

_Array = ["U_Vory_Apparel_Blk","U_Vory_Apparel_Wht","U_Vory_Apparel_Red","U_Vory_Apparel_Gry"];
_select = _Array call bis_fnc_selectrandom;
 
hint format ["%1",_select];
  • Like 2

Share this post


Link to post
Share on other sites

Just add a script connect to the config so when the unit spawn run a code that will select the gear random

 

something like this for the code

 

_Array = ["U_Vory_Apparel_Blk","U_Vory_Apparel_Wht","U_Vory_Apparel_Red","U_Vory_Apparel_Gry"];

_select = _Array call bis_fnc_selectrandom;

 

hint format ["%1",_select];

Ah splendid! Thank you so much for the code! This will be very handy.

Cheers mate! Thank you for your help! :D

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

×