It is very possible. You would run a script file when you want to make the unit move out, either via trigger or called in another script, or even from its init line if you wish for it to move straight away.
Start with:
...which will return either 0, 1, 2, 3 or 4. Moving on:Code:_groupOne = group *whateverunit*; _randomWPinteger = round (random 4);
The AI will randomly "select" and move to one of your 5 waypoints. All you do is put down markers where you want to give the option for the AI to move to in each case, and then run another similar script upon reaching the waypoint.Code:if (_randomWPinteger = 0) then {[_groupOne, 1] setWPPos markerPos "MarkerWPPossibility1"}; if (_randomWPinteger = 1) then {[_groupOne, 1] setWPPos markerPos "MarkerWPPossibility2"}; etc etc ad infinitum
It's not easy, but it's certainly not Maths C surd multiplication either.
Note that the above code is probably broken in about 30,000 places, but I'm currently not in the mood to write something ironclad.
Further discussion probably belongs in A2 scripting.
HOME 

Reply With Quote

Phantom Mission Site
copyToClipboard format ["this setPosATL %1;this setDir %2;",getPosATL player, getDir player];


