Jump to content
ICE_PIC_JAPAN

Help! How to force unit group stop and move again

Recommended Posts

Hello, I'm making a single mission.

I wanna make enemy group wait in the building until bulfor goes in the trigger.

but as we know, they go outside and be found by bluefor.

always AI of Arma 3 spoils my scenario and makes me drain.

so plz tell me how to make them wait for bulfor in the building and 

when bluefor go in the trigger like

trigger condition: Player in thisList, and skip wp of enemy.

and move to next wp to attack bluefor.

Share this post


Link to post
Share on other sites

There's a few things you can do.  One is after placing units in building (or after units move to building), execute this on those units:

_unit forcespeed 0;

This will guarantee the units don't move.  When the blufor trigger occurs, you need to execute the following to get the untis to move again:

_unit forceSpeed -1;

If you are using waypoints, and want units to stop at a certain waypoint and wait until some condition occurs, you can put the following in the activation box of the waypoint where you want units to stop.  I usually use a TALK waypoint for this, because it doesn't move the unit:

this lockwp true;

After some condition occurs, you can then do the following to unlock the waypoints, so units proceed to next waypoint

group myUnit lockwp false;

"myUnit" is some unit you named in the group that is following the waypoints.

 

Edit:  You can also do @sarogahtyp's excellent suggestion and use disableAI "PATH" command.  I didn't read that until now.  🙂 

  • Like 3

Share this post


Link to post
Share on other sites

A bit on Synching

= = = = = = = = =

 

Place yourself on the map in a place where you can watch the action.

 

Place 2 other men on the map. All the men are separate, none of them report to any other man.

 

Give both men some waypoints.

 

For man 1:   Waypoint 1 is  50 meters to his front:  Waypoint 2 is 100 meters further on:  Waypoint 3 is 50 meters further on:  Waypoint 4 is 50 meters further on for a total of 250 meters

 

For man 2:   Waypoint 1 is  100 meters to his front:  Waypoint 2 is 50 meters further on:  Waypoint 3 is 50 meters further on:  Waypoint 4 is 50 meters further on for a total of 250 meters

 

 

Now Synch both of the waypoint 1's to each other   and Synch both of the waypoint 3's to each other

 

 

Both men start together  but man 1 reaches his waypoint 1 first.  Because they are Synched, he will stop and wait till man 2 has reached his first waypoint.  Then with man 2 having a 50 meter lead they both continue to both their waypoints 2  and then onto their Waypoints 3.

 

At which point man 2 will stop and wait till Man 1 has reached his Waypoint 3.

 

Then both men will continue and reach Waypoint 4 at the same time.

 

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites
On 6/19/2021 at 5:00 AM, johnnyboy said:

There's a few things you can do.  One is after placing units in building (or after units move to building), execute this on those units:


_unit forcespeed 0;

This will guarantee the units don't move.  When the blufor trigger occurs, you need to execute the following to get the untis to move again:


_unit forceSpeed -1;

If you are using waypoints, and want units to stop at a certain waypoint and wait until some condition occurs, you can put the following in the activation box of the waypoint where you want units to stop.  I usually use a TALK waypoint for this, because it doesn't move the unit:


this lockwp true;

After some condition occurs, you can then do the following to unlock the waypoints, so units proceed to next waypoint


group myUnit lockwp false;

"myUnit" is some unit you named in the group that is following the waypoints.

 

Edit:  You can also do @sarogahtyp's excellent suggestion and use disableAI "PATH" command.  I didn't read that until now.  🙂 

 

hello, thx for ur advice n sorry for late my reply.

tried some plz watch this video i tried to use this lockwp~

this lockwp true

yes, i could make group leader stop at wp 1.

 

but I wanted to make not only 1 unit stop, but make group stop and make them move again with trigger.

this lockwp false

 

 

Share this post


Link to post
Share on other sites
31 minutes ago, ICE_PIC_JAPAN said:

but I wanted to make not only 1 unit stop, but make group stop and make them move again with trigger.

Try this to get all units to stop. Put this in waypoint onActivation:

this lockwp true; {_x forcespeed 0;} foreach units group this;

And when you want all units to move again, do this:

this lockwp false; {_x forcespeed -1;} foreach units group this;

 

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, johnnyboy said:

Try this to get all units to stop. Put this in waypoint onActivation:


this lockwp true; {_x forcespeed 0;} foreach units group this;

And when you want all units to move again, do this:


this lockwp false; {_x forcespeed -1;} foreach units group this;

 

hello, thank u very much for ur advice.

I got how to make group stop with it.

but when I make them move again, I have to write code on trigger,

so I have to change "this lockwp false; {_x forcespeed -1;} foreach units group this;

where should i change to group name (Enemy2)?

cus when I use this lockwp true; {_x forcespeed 0;} foreach units group this; on wp1,

they still stay on wp1.

Share this post


Link to post
Share on other sites

"this" only works within a waypoint.  Change "this" to actual group name in trigger:

Enemy2 lockwp false; {_x forcespeed 0;} foreach units Enemy2; 

Good luck!

  • Like 1

Share this post


Link to post
Share on other sites
On 6/27/2021 at 11:27 PM, johnnyboy said:

"this" only works within a waypoint.  Change "this" to actual group name in trigger:


Enemy2 lockwp false; {_x forcespeed 0;} foreach units Enemy2; 

 Good luck!

https://www.twitch.tv/videos/1076361801

thanks to ur advice, I could do that like this video :)/

 

  • Like 3

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

×