12-03-2010, 02:29 PM
The following modification to the above code will place the centre of the artillery strike at a random location within a 150 meter radius of the target unit:
I have replaced the simple designation of the target location of
with the calculation of the random position inside the 150 meter radius:
You can modify the radnom radius by changing the 150 numbers in above code.
Code:
[AriLogicName, 200] call BIS_ARTY_F_SetDispersion; [AriLogicName, [((getPosASL s1) select 0) + (random 150) - (150 / 2), ((getPosASL s1) select 1) + (random 150) - (150 / 2), (getPosASL s1) select 2], ["IMMEDIATE", "HE", 0, 15]] call BIS_ARTY_F_ExecuteTemplateMission;
I have replaced the simple designation of the target location of
Code:
getposASL s1
Code:
[((getPosASL s1) select 0) + (random 150) - (150 / 2), ((getPosASL s1) select 1) + (random 150) - (150 / 2), (getPosASL s1) select 2]