Hi all
Ok im currently working hard on the A&B Predator mod and im hitting a wall when trying to get the random tail numbers synchronization in MP below is my current code and my question is how can i make this work in mp with out causeing to much network lag.
_thisuav = _this select 0;
_check = _thisuav getVariable "armatuavnumber1";
if ( !isnil ( "_check" ) ) then
{
_thisuav setobjecttexture [ 0, format [ "\ArMaT_Predator\char\numbers\%1.paa", _thisuav getVariable "armatuavnumber1" ] ];
_thisuav setobjecttexture [ 1, format [ "\ArMaT_Predator\char\numbers\%1.paa", _thisuav getVariable "armatuavnumber2" ] ];
_thisuav setobjecttexture [ 2, format [ "\ArMaT_Predator\char\numbers\%1.paa", _thisuav getVariable "armatuavnumber3" ] ];
_thisuav setobjecttexture [ 3, format [ "\ArMaT_Predator\char\numbers\%1.paa", _thisuav getVariable "armatuavnumber4" ] ];
_thisuav setobjecttexture [ 4, format [ "\ArMaT_Predator\char\numbers\%1.paa", _thisuav getVariable "armatuavnumber5" ] ];
_thisuav setobjecttexture [ 6, format [ "\ArMaT_Predator\char\numbers\%1.paa", _thisuav getVariable "armatuavnumber6" ] ];
_thisuav setobjecttexture [ 7, format [ "\ArMaT_Predator\char\numbers\%1.paa", _thisuav getVariable "armatuavnumber7" ] ];
_thisuav setobjecttexture [ 8, format [ "\ArMaT_Predator\char\letters\%1.paa", _thisuav getVariable "armatuavletter1" ] ];
_thisuav setobjecttexture [ 9, format [ "\ArMaT_Predator\char\letters\%1.paa", _thisuav getVariable "armatuavletter2" ] ];
_thisuav setobjecttexture [ 10, format [ "\ArMaT_Predator\char\letters\%1.paa", _thisuav getVariable "armatuavletter3" ] ];
_thisuav setobjecttexture [ 11, format [ "\ArMaT_Predator\char\letters\%1.paa", _thisuav getVariable "armatuavletter4" ] ];
_thisuav setobjecttexture [ 12, format [ "\ArMaT_Predator\char\letters\%1.paa", _thisuav getVariable "armatuavletter5" ] ];
_thisuav setobjecttexture [ 13, format [ "\ArMaT_Predator\char\letters\%1.paa", _thisuav getVariable "armatuavletter6" ] ];
}else
{
_numberarraynum = [ 0, 1, 2, 3, 4, 5, 6, 7 ];
_letterarraynum = [ 8, 9, 10, 11, 12, 13 ];
_numbers = [ "00", "01", "02", "03", "04", "05", "06", "07", "08", "09" ];
_alphabet = [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" ];
_numcount = count _numbers;
_count = 0;
_alphacount = count _alphabet;
{
_randomselect = _numbers select round( random( _numcount ) );
if ( !( format[ "%1", _randomselect ] in _numbers ) ) then
{
_randomselect = "00";
};
_thisuav setobjecttexture [ _x, format [ "\ArMaT_Predator\char\numbers\%1.paa", _randomselect ] ];
_count = _count + 1;
_thisuav setVariable [ format [ "armatuavnumber%1", _count ], _randomselect ];
sleep 0.5;
}
foreach _numberarraynum;
_count = 0;
{
_randomselect = _alphabet select round ( random( _alphacount ) );
if ( !( format[ "%1", _randomselect ] in _alphabet ) ) then
{
_randomselect = "a";
};
_thisuav setobjecttexture [ _x, format [ "\ArMaT_Predator\char\letters\%1.paa", _randomselect ] ];
_count = _count + 1;
_thisuav setVariable [ format [ "armatuavletter%1", _count ], _randomselect ];
sleep 0.5;
}
foreach _letterarraynum;
};