raymix Posted June 2, 2016 Report Share Posted June 2, 2016 On 01/06/2016 at 9:19 AM, axeman said: You are calling (execVM) the sqf before declaring _file, try: private ["_file"]; _file = [250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2500]; 0 = [] execVM format ["overwrites\click_actions\%1.sqf",selectRandom _file]; If you want to reduce it further: 0 = [] execVM format ["overwrites\click_actions\%1.sqf",selectRandom [250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2500]]; https://community.bistudio.com/wiki/selectRandom This is for Arma 2, Axeman, he'll have to use the random like in the first example I posted. Kiwi you did it again, lol _file = ([250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2500]); Should be _file = [250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2500]; Linux 1 Link to comment Share on other sites More sharing options...
raymix Posted June 2, 2016 Report Share Posted June 2, 2016 //A2 compatible _file = [250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2500]; _rand = _file select (floor (random (count _file))); execVM format ["overwrites\click_actions\%1.sqf",_rand]; // or a one-liner for lols execVM format ["overwrites\click_actions\%1.sqf", [250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2500] select (floor (random (count _file)))]; Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now