Adding Randomized Numbers and Emblems
By Soul Assasin.
1. Make a plane in Oxygen dimensions: 1x1 ...
2. Load up one number texture (use #1). Make sure it fits onto the plane you made earlier. Now select the plane and apply the texture using B.
3. Copy paste the plane twice (for a 3 number variation) and place the copies next to each other.
4. Now select the first plane and right-click in the selections window:
Select NEW and name the selectio 'n1':
5. Repeat the step for the rest of the planes with 'n2', 'n3' and so on.
6. Ok now the difficult part, scripting and coding. In your config in class cfgModels the following should be present:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{
*** *** ***sectionsInherit="Vehicle";
*** *** ***sections[]={"n1","n2",&# 34;n3"};
*** };[/QUOTE]
in your cfgVehicles configuration this line should be present:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hiddenSelections[] = {"n1","n2","n3"};[/QUOTE]
I would advise leaving the coding and scripting to someone who knows his/her way around these things.
I suggest yuo take the numRand scripts from the T55 pack and take a close look at how the randomization is done.
IMPORTANT NOTE:
The line of ***script:
this setobjecttexture [ #, "pathname"]
is used to manually change the texture on the hiddenselection. The # corresponds to the order of selections you used in your defenitions, thus for n1 it would be:
this setobjecttexture [ 0, "pathname"]
for n2:
this setobjecttexture [ 1, "pathname"]
and so on.
Here is a part of the randomization process (only for n1):
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#n1
? _unit in RHS_T55sWithoutRandomization: Exit
_nrand = random(100)
?_nrand > 90: _unit setObjectTexture [0, "\SIG_T55\n9.paa"], goto "n2"
?_nrand > 80: _unit setObjectTexture [0, "\SIG_T55\n8.paa"], goto "n2"
?_nrand > 70: _unit setObjectTexture [0, "\SIG_T55\n7.paa"], goto "n2"
?_nrand > 60: _unit setObjectTexture [0, "\SIG_T55\n6.paa"], goto "n2"
?_nrand > 50: _unit setObjectTexture [0, "\SIG_T55\n5.paa"], goto "n2"
?_nrand > 40: _unit setObjectTexture [0, "\SIG_T55\n4.paa"], goto "n2"
?_nrand > 30: _unit setObjectTexture [0, "\SIG_T55\n3.paa"], goto "n2"
?_nrand > 20: _unit setObjectTexture [0, "\SIG_T55\n2.paa"], goto "n2"
?_nrand > 10: _unit setObjectTexture [0, "\SIG_T55\n1.paa"], goto "n2"
?_nrand >= 0: _unit setObjectTexture [0, "\SIG_T55\n0.paa"], goto "n2"[/QUOTE]
this has to be done for n2 and n3 respectively.
Enjoy.
HOME 





Reply With Quote


| 
