1.Anyway (for othe purposes) I need "enableAI" script I made function: simply delete unit and then create the same ( the same type, group,weapons, ammo ( to magazine )),created unit is returned. The problem is that units are a bit dull - their way to MG is a bit strange... ingame pathfinding:
How would you react when they suddenly put you down somewhere in the middle of a fight? ;D
Nice way to get around a problem
I remember there was a script for pathfinding but I can't find it back. Have you tried reveal MG?
I wanted to use aicover and manMG scripts.
But I had to modify them to achieve better results.
Instead of disgrouping units in cover script I used disableAI (this is not the only change
Thanks for using Aicover2.0, but you have used it in a wrong way.
The script needs a trigger to run, the crouching part does work without the trigger, but not the scanning part. The units will change their targets depending on a certain distance and knowsabout value. When a unit comes close (+-50m) and a trenched unit has spotted him (kniowsabout) , he will change his target to that unit. If there are more, he will target the mostknown. I did it because single units are not so alert then units in group, Infoshare from GB was also a good way to solve this.
Anyway, it's a very nice idea,
- The coverscript will work without ungrouping them, you can play as the commander assigning targets to the trenched units .I did it on the Cat_afganistan map in one of those towns with lots of climbable roofs and it was big fun but hard. After some time I've noticed that the units will leave their positions in some situations , so I decided to ungroup them from the beginning.
They will stay in position as long as you don't give them the order to attack (LMB), giving them target orders (RMB) is no problem.
You have combined it with manmg from GB which is great, I never thought of that
-I saw you've changed a line in the crouch part... they are lying down now instead a popup kneel. It's harder to hit them now, but easier to approach.
In the example mission the location of your gunnest was perfect,I think it was the good choice to make them go prone.
- An idea I tried was ; putting some ammocrates behind the trenches, and when they run out of ammo they leave their position , reammo and move back behind the trench.
Problem was that he left his position , rearmed, but he didn't use his magazines, he just stood there.
I dunno why.
*edit*
I just gave it a try, really great work, I had a great fight in ECP with it, I doubled the amount of troops on both sides and played with WEST, while one group keeps them busy from a distance, the other group tries to flank them.
To make the flanking manouvre more difficult I place a BMP on hold in the open field, left from the gunnest.
I saw a bug too, when I reached the hill the only one left was the M2 machinegunner, when I killed him a new unit was created behind the sandbags...
In your example the units are still in group,it's a lot better now.
Also the scanscript is not needed anymore because the men can share info about the enemy and best of all, when you play as an officer you can simply assign targets with your binoc and your men will stay in position.
I just had to change a few lines in the init part :
#init
_unit = _this select 1
_trig = _this select 2
_grp = group _unit
_units = units _grp
"_x setbehaviour ""SAFE""" foreach units _grp
_c = count _units
_i = 0
#cycle
_unit = _Units select _i
?_unit == player : goto "skip"
_dir = getdir _unit
_unit disableAI "move"
;_unit disableAI "Target"
;[_unit] join grpnull
["crouch",_unit,_trig,_dir] exec "AIcover2.sqs"
#skip
_i = _i + 1
?_i < _c : goto "cycle"
exit
Just in case you are the player, the crouch script doesn't have to run on you.