Yeah, I will post it.....but unfortunately it will be in .sqs format, but there maybe someone in the community who will do the .sqf conversion....
Although this script seems not a HARD one [at least Mandoble can do it] but it fits in the hard section of my brain, so I may need help.
Now the array case,if you could answer me [if you know] how to get the MAXIMUM position of a building, it will be nice.
Here is the first RAW script...
_target = _this select 0;
_radius=_this select 1;
_timegiven=_this select 2;
_heli="HeliHempty" createvehicle position _target
_heli setpos [(getpos _target select 0)+(random _radius+random -_radius),(getpos _target select 1)+(random _radius+random -_radius),0]
;creates an invisible Helipad and move it to some where around _target within _radius.
#loop
if (not(alive _target)) then {exit};
_target domove getpos nearestbuilding _heli
;unit moves to building...
if (isNil "_timegiven") then {goto "notime"};
~_timegiven-1
#notime
_heli setpos [(getpos _target select 0)+(random _radius+random -_radius),(getpos _target select 1)+(random _radius+random -_radius),0]
~1
goto "loop"
The script currently makes the unit move to the buildings only, not all the positions of the buildings.
It should be :
_target domove (nearestbuilding _heli buildingpos position)
instead of
_target domove getpos nearestbuilding _heli
I have tried
_counter = nearestbuilding _heli count buildingpos
hint format ["%1",_counter]
_target domove (nearestbuilding _heli _counter )
And all i got in the hint is :
scalor
The hint shows scalor and i don't know what is that.
The script can be further expanded, with mode,speed, behaviour of unit etc but i just wanted to show you the simplest one[right now].
If you can, please test it with your machine,as mine has an out-dated ver of ArmA
Haroon1992...............................