Jump to content
Archosaurus

Resume group's editor waypoints after doMove or doStop

Recommended Posts

Hello.

 

 

I'd like to know how to make a group resume it's editor placed WP's, or the WP it was doing before a doStop or doMove is in place.

 

For example:

 

_vehicle has a move waypoint in the editor.

 

Let's say that if a=1, then _vehicle runs doStop and it stops.

 

Something makes a=2, and the vehicle resumes what it was doing.

 

Is this possible, or even feasible to input via simple code?  

 

Also, I tried:

 

_travel = currentWaypoint _vehicle;

 

if (condition) then {
_vehicle setCurrentWaypoint [_travel];
};
 
and it just caused the vehicle to wander off in the opposite direction. 
 
 
EDIT:
 
_tank = [test_tank];
_destination = (expectedDestination test_tank) select 0;
 
 
doStop test_tank;
sleep 10;
test_tank doMove _destination;
 
Seems to work.
 
EDIT 2: After further testing, this craps up too.
 
Is there any way to get the position of a group's current waypoint then doMove there? I tried the obvious ways, but nothing worked, kept getting errors. 

Share this post


Link to post
Share on other sites

to stop the units when I use  dostop I do this

{dostop _x} foreach units mygroup

to get them to continue I use

{[_x] join mygroup} foreach units mygroup

I only used it in A2/OA so unless they messed something up in A3 it should work.

 

I just noticed your talking vehicles, I'll have to check that later.

 

Yes seems fine for vehicles as well.

 

this will return position of current waypoint

waypointPosition [mygroup,currentWaypoint mygroup];

Share this post


Link to post
Share on other sites

I didn't know about waypointPosition. I was thinking it's strange that we couldn't return a WP's position, I thought. 

 

I'll take a look.

Share this post


Link to post
Share on other sites
On 1/6/2016 at 0:40 PM, f2k sel said:

to stop the units when I use  dostop I do this


{dostop _x} foreach units mygroup

to get them to continue I use


{[_x] join mygroup} foreach units mygroup

 

 

This hack still works in A3. Also you don't need to "foreach" as join accepts array already
 

units _group joinSilent _group; //<---- bad

EDIT: Scratch that, terrible hack. leader may change during this rejoining. Instead use doFollow https://community.bistudio.com/wiki/doFollow
 

units _group doFollow leader _group; //<---- good

 

Edited by killzone_kid
better example

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

×