Ok, I need a script that will check if every unit in a given array knows about any enemy unit in another array. :-\
And if so, to what extent i.e (_Unit knowsAbout _enemyUnit >0 etc...).
I have written a small script....
I have two problems with it.....
1. It has a loop which goes through every unit, and although the lag isn't too bad on my PC - (Athlon1600,64Mb GeForce 4,512Mb RAM) - it will be horrendous on lower spec machines.
2. It doesn't work properly. Also, I just think there are smaller, less CPU heavy and more effective scripts out there. I just haven't got time to look. :'(
So, if one of you has written a script or knows about a script which would be useful to me, could you please contact me?
Alternatively, if there are any gurus out there who can write it for me....
....here's what I need.
I have 4 alarm triggers radiating from the centre of the main objective (A village.)
There are 2x 5 man patrols inside the village, when each alarm is triggered - the patrol move to pre-set waypoints. (This part is fine.)
To complete the EAST AI for this objective, I have 2x BMPS each carries 1x 5 man patrol.
Each BMP starts at a random location at least 750m from the village centre.
[This is the part I'm stuck with....1a...If an enemy has been spotted, I want a BMP to move towards that position quickly and ready to fire upon any WEST units it comes upon.
2aIf it arrives at waypoint, and it knowsAbout no enemies, then return to instruction
1a. (Being alert and ready to fire at the same time.)
2bHowever, if the BMP is approaching the waypoint and it knowsAbout enemy units to a degree of 1 or greater (greater than 0, but less than 1)then it will advance upon the waypoint slowly, ready to fire.
2cHowever, if the BMP is approaching the waypoint and it knowsAbout enemy units to a degree of 2 (greater than 1, but less than 3) then it will unload the patrol and all will advance upon the waypoint slowly, ready to fire.
2dIf the knowsAbout value is equal to 3, then a more aggressive stance is required, ie unload troops quickly.....attack immediately, etc.
2dIf the value is 4, same as above, only more aggressive (ie , maybe call in backup?)
If anyone thinks they can help, or maybe point me to a similar script I would be very grateful.
Any scripts used in my mission 'Paratroopers v1.3' will get due credit.
Thankyou ;D