Jump to content

foobee

Member
  • Content Count

    4
  • Joined

  • Last visited

  • Medals

Everything posted by foobee

  1. You might want to unPBO warfare2.pbo found in AddOns folder, there are some examples provided in warfare2.pbo/MPMissions... Cheers
  2. Since Arma 1.05, there's a new function, assignedVehicleRole. See it here The function returns detailed turret positions too <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _myArray = []; _myVehicle = XXXX; { if ( (count (assignedVehicleRole _x)>0) && ((assignedVehicleRole _x) select 0) == "Cargo") then { _myArray = _myArray + _x; }; } forEach crew _myVehicle; (I did not test the code but you get the idea...) Edit: I revived this old thread as it is linked on a biki page (which I closed and can't find back...)
  3. Hello, you can randomize the select in the array : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _array = ["script_A.sqf","script_B.sqf","script_Z.sqf"]; _script = _array select (random ((count _array) - 1)); [...] execVM _script; ('old' syntax below) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _array = ["script_A.sqf","script_B.sqf","script_Z.sqf"] _script = _array select (random ((count _array) - 1)) [...] exec _script 'Random' returns real values, you can check about index rounding here. This code won't work on an empty array Cheers
  4. Thanks Sickboy, nice scripts ! I noticed that you use while(true) infinite loops as listeners, you might want to read this topic about such loops ending after 10k cycles. Very informative topic by the way... Keep up the great work! Cheers
×