Jump to content
rcmw

A way to stop vehicles from moving after they reach a waypoint?

Recommended Posts

I'm looking for a way to stop APC and other vehicles from driving off after they reach a waypoint in combat, but still able to move to a waypoint when given one. At the moment they travel to the waypoint fine but have a habit of driving off in a random direction to do, only the AI knows what, running over my infantry and generally causing havoc in my mission.

I'm using the high commander module so changing the kind of way point given is not an option, it gives out move waypoints, also I can't use DisableAI as I need them able to move to waypoint when the high commander gives them. What I don't want is them doing random things on there own initiative. Is there a way to turn this off?

I'm hopping someone knows what part of the AI makes them do thins and has a way to turn it off, or another idea. Thank you.

Share this post


Link to post
Share on other sites
setFuel 0? ;)

er same problem as DisableAI :) I still need them able to move, just not running all over my infantry the second someone fires a gun.

---------- Post added at 07:17 PM ---------- Previous post was at 06:51 PM ----------

humm I think if I can force them to stay in AWARE state it would fix it. I suspect its the combat IA behaviour that is the problem. Is there a way to force a unit to stay in AWARE even when being shot at and still fire back?

Share this post


Link to post
Share on other sites

I know none scripts or commands to halt a vehicle, except some workarounds like removing the

driver of a vehicle (in that case, driver should never be the commander of the veh), adding him demand and joining him to the group relative to a veh.

Already tried this? Ofc, if your groups are mechanized infantry-type, you'd need more modifications to units of a group you aim to modify, so the other units don't try get into as drivers, etc.

Also, try smth like 'driver vehicle a1 doStop true' or similar.

Share this post


Link to post
Share on other sites

Problem is I never know when I need the vehicle to move again as it is commanded with the high commander module, so anything that completely stops the vehicle and needs another script to start it moving again will not work. If I wanted to do that simply disableAI "move"; on the driver would do the job easy. I need something that just stops its random roaming. It never did this in Arma 2, APCs and tanks would move and engage at the waypoint without going all-over the place, so its something new they added in Arma 3.

For example this is what currently happens at the moment. Three APCs move on a hill and stop with a support infantry squad and two rifle squads approaching a town from the left. Then a few shots are fired, the infantry moves into cover and returns fire (this is good), the APC do not behave so well. One APC drives 400 meters in a random direction away from the combat, another accelerates towards the town at full speed running over any infantry in its patch and gets blown up, the last APC drivers round in circles running over the rest of the infantry, its chaos!

The more I think about it I think its the COMBAT state AI, I need a way to force a group to remain in AWARE when being shot at. I will start a new thread about that in a day or so since the title of this one dose not ask that question.

Share this post


Link to post
Share on other sites
I'm using the high commander module so changing the kind of way point given is not an option, it gives out move waypoints,
It is possible to change a waypoints information - type, combat mode etc (limit somewhat) in HC via right clicking the waypoints via the map. Maybe not how you want to do it but thought i would point that out.

It should from a quick look be possible to add to this menu by overwriting BIS_HC_path_menu to point to your own menu, see A3\modules_f\HC\data\scripts\HC_GUI_menu.sqf and maybe creating your own menu to go with, would need further investigation.

Edited by Larrow

Share this post


Link to post
Share on other sites

You could do this with a waitUntil if you just set a variable to false, then sleep for X amount of seconds, then when that variable is true, the waitUntil can then proceed to the code that lets the vehicle move.

  • Like 1

Share this post


Link to post
Share on other sites

I found syncing a further way point even if it is a troop heading across the map out of the mission area  helps.
Been looking for a good fix too..

Share this post


Link to post
Share on other sites

Does anyone know if you can use an empty vehicle and have the driver grouped to no one, but just have the commander and gunner grouped ?
Then you could run the driver in careless and the gunner and commander in combat ? And just spawn them via moveIn command ?
I'm going to try this later to see if it can be a dirty workaround.

Share this post


Link to post
Share on other sites

There is also good option in modules :
Modules > Object modificators > specify AI mode ( i use diferent language, it may be writed diferent) - 100% works!

Share this post


Link to post
Share on other sites

Why not simply use

 

tank stop true;

tank stop false;

This simply works! Tested many times.

Share this post


Link to post
Share on other sites

Be careful about the "stop" command, since it will also prevent the unit from firing or watching any targets.

Using

groupname enableAttack false;
{dostop _x} foreach units groupname;

should prevent the group leader from giving any move commands to individual units, so they'll stay in place but still able to track targets/fire at them.

 

Cheers

Share this post


Link to post
Share on other sites

On module i writed about you can choose what synchronized units will and what they wouldn't.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×