OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: ZapBrannigan on 16 Sep 2010, 15:32:47

Title: The Nightmare of getting units to Rush
Post by: ZapBrannigan on 16 Sep 2010, 15:32:47
After a lot of testing. I have found that the only possible way to get units to rush towards the enemy without stopping is for units to be in a group with only themselves.  and on setbehavior careless speed full.  This is horribly frusterating for anybody making a dday mission or anything like that. If you put them in groups on careless and full they will not rush anymore. they will start walking or just stop.  and if you put them in groups on normal aware mode.  They will just do the normal thing where they move a few meters at a time constantly going prone.   Setting them to setunitpos up will make them just stop every few meters then move a few meters.

does anybody have a way I can make a whole group rush without having to sepertate and give each unit a waypoint? or any advice on this at all? its soo frusterating.

thanks
Title: Re: The Nightmare of getting units to Rush
Post by: haroon1992 on 17 Sep 2010, 09:45:32
May try the following :

this disableAI "AUTOTARGET";
this allowFleeing 0;

Or maybe you should setcaptive the enemies to TRUE until the group arrives to the desired location,then setcaptive them to FALSE again.

Use a trigger.
Act : EAST Present
RADIUS : value that'll cover all the enemies.
On Act : {_x setCaptive TRUE} foreach thislist;

Not sure if that will work because the enemies will still shoot the group....
Try it and if that doesn't work, Wait for further and possibly better replies from others.


Regards,
Haroon1992
Title: Re: The Nightmare of getting units to Rush
Post by: kju on 18 Sep 2010, 09:47:35
Try

Code: [Select]
//set AI default behavior
_currentAIgroup setBehaviour "AWARE";//STEALTH
_currentAIgroup setSpeedMode "FULL";//NORMAL
_currentAIgroup setCombatMode "RED";
//_currentAIgroup setFormation "WEDGE";
{_x setUnitPos "MIDDLE";} forEach (units _currentAIgroup);

+

Code: [Select]
_newWaypoint = _currentAIgroup addWaypoint [_newTargetPosition,_radius,currentWaypoint _currentAIgroup];
_newWaypoint setWaypointType "MOVE";
_newWaypoint setWaypointBehaviour "AWARE";

sleep 0.001;

_currentAIgroup move _newTargetPosition;