Jump to content
Sign in to follow this  
humvee28

Randomness in Replacement Config

Recommended Posts

Hi!

I have made a Replacement-Config (TF86 Seals for BIS Delta Force), and i would like to add some Randomness to the Units (TF 86 Seals got a huge amount of Units in different Camos).

Is it possible to let the Replacement-Config call different Units by Random?

And if yes, can somebody please show me how?

Thanks in Advance! :)

Share this post


Link to post
Share on other sites

Hi!

I´m still learning about Stuff on my own, since no one want to help me here.

Maybe something could be done par Units with hiddenselections in it and an XEH initialized Script.

RHS Decals does the same thing i´m looking for. I will ask the Author if i can take a look into that. :)

Share this post


Link to post
Share on other sites

I'll be interested to see how out goes, I was thinking of learning to do it for a weapon replacement config

Share this post


Link to post
Share on other sites

You could add random textures (if unit supports setObjectTexture). I would solve it this way:

add a custom config entry:

MYTAG_availableTextures[] = {"\myaddon\textures\texture_one.paa","\myaddon\textures\texture_two.paa"};

Then a init eventHandler which reads out this array and randomlly selects one those textures:

_texArray = getArray (configFile >> "cfgVehicles" >> (typeof _this) >> "MYTAG_availableTextures");
_tex = _texArray select (floor(random(count _texArray)));
_this setObjectTexture [_tex, 0];

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  

×