Jump to content
Sign in to follow this  
Dariox

random help

Recommended Posts

I have a script that creates the sectors in random, but I would like once you chose the new field is removed from the new random.

this is a part of the script

if (isServer) then {
sleep 8;
if ((inizioW == 0) or (inizioE == 0 )) then {
_random = ["Kavala", "Frini", "Ifestiona", "Galati", "Syrta", "Kore", "Orino", "Negades", "Neri", "Panochori", "Therisa", "Poliakko", "Alikampos", "Lakka", "Stavros", "Anthrakia", "Rodopoli", "Charkia", "Kalochori", "Dorida", "Chalkeia", "Pyrgos", "Sofia", "Molos", "Ioannina", "Panagia", "FireBase", "Zaros", "Factory", "Oreokastro", "Aggelochori", "Abdera", "Neochori", "Athira", "Paros"] call BIS_fnc_selectRandom;
sleep 6;
_mainpos = getMarkerPos _random;
GlobalMainPos = _mainpos;
publicVariable "GlobalMainPos";
Citta = _random;
publicVariable "Citta";

for the next round restart the script , I would not want the usual city

sorry for my english ( google traslate )

thx for any idea

Dario

Share this post


Link to post
Share on other sites

I don't have arma on this computer to test but something like this maybe?,

if(isNil "arrayOfRandom") then 
{
arrayOfRandom = ["Kavala", "Frini", "Ifestiona", "Galati", "Syrta", "Kore", "Orino", "Negades", "Neri", "Panochori", "Therisa", "Poliakko", "Alikampos", "Lakka", "Stavros", "Anthrakia", "Rodopoli", "Charkia", "Kalochori", "Dorida", "Chalkeia", "Pyrgos", "Sofia", "Molos", "Ioannina", "Panagia", "FireBase", "Zaros", "Factory", "Oreokastro", "Aggelochori", "Abdera", "Neochori", "Athira", "Paros"];
};
_random = arrayOfRandom call BIS_fnc_selectRandom;
arrayOfRandom = arrayOfRandom - [_random];

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  

×