Jump to content
Sign in to follow this  
madrussian

Strange & perplexing problem with doFollow

Recommended Posts

Stumped at the moment by A3 issue.  This one's pretty simple to recreate and witness.

 

Running doFollow on a group of men in a vehicle (in this case my own squad), causes all the mounted cargo guys to disembark the vehicle.  [Note that the Fire From Vehicle (FFV) guys stay mounted.]  I absolutely need to use doFollow as part of a Regroup script for my Group Linked Respawn system.  But I can't have men errantly disembarking like this! :sadlike:

 

I have tried numerous things to keep them in their seats: allowGetIn true, orderGetIn true, getting their cargo index via getCargoIndex and reassigning it back to them via assignAsCargoIndex, then directly moving them back to own seat via moveInCargo [_vehic, _cargoIdx].  I even tried disableAI "ALL" on all my mounted subordinates before calling the doFollow.  But still, the cargo guys keep bailing out.

 

Anyone else run into this?  Any ideas on how use doFollow without it ejecting your (cargo) subordinates from their vehicles?

 

I welcome any and all help, inc simple things I may have missed.  Thanks! :smile_o:

  • Like 2

Share this post


Link to post
Share on other sites

Indeed this seems to be the case.

Well the AI seems to be truly done for this iteration...

 

Placed a HEMTT transport with a waypoint, a few units in the cargo slots, all of the same group.

Then called this:

{_x doFollow leader group _x} forEach units squadLeader;

Half the squad left the vehicle, just to get in again.

After that the vehicle starts moving towards the waypoint...

 

Not really sure if it's worth it to post a ticket.

 

Cheers

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Nice to see it confirmed Grumpy, thanks.  Any ideas on a workaround?

 

The closest thing I can come up with so far is teleporting the cargo guys out and back in directly after the doFollow (which indeed keeps them from disembarking) and doing all this inside a call etc, but it's really ugly as you can see the transition big time (i.e. can see the animation of them sitting back down).  Hoping I can do better, as it's quite offensive looking.

Share this post


Link to post
Share on other sites
13 hours ago, madrussian said:

Nice to see it confirmed Grumpy, thanks.  Any ideas on a workaround?

 

The closest thing I can come up with so far is teleporting the cargo guys out and back in directly after the doFollow (which indeed keeps them from disembarking) and doing all this inside a call etc, but it's really ugly as you can see the transition big time (i.e. can see the animation of them sitting back down).  Hoping I can do better, as it's quite offensive looking.

Not that I know of, seems the AI brain waits for the units to disembark, then waits for everyone to get in again.

You could force every unit out of the vehicle using moveOut command, then immediately moveInAny, might do the trick but strongly depends on how the AI FSM is working.

 

Cheers

Share this post


Link to post
Share on other sites

Old topic but anyway...

 

My guess is that "doFollow leader" will force A.I. to move to their formation position which is not possible in a vehicle so they will disembark the vehicle.

Maybe some kind of bug or not correctly implemented way of how doFollow should be working for A.I. in vehicle or may even supposed to be working like this?

  • Like 2

Share this post


Link to post
Share on other sites

try lockXXX vehicle positions

otherwise getOut EH + move back in

 

doFollow is to cancel subgroups. units in vehicle (cargo?) are seen as subgroup

 

cleaner would be new SQF commands to:

1) dissolveSubGroup(s)

2) returnToFormation(Position)

  • Like 2

Share this post


Link to post
Share on other sites

For the record, I never really overcame this issue.  Also iirc, I did try all the vehicle locking commands too (but memory's a bit fuzzy on that now, so you may want to try it).  The workaround I settled on for my Regroup script was to simply never doFollow mounted cargo guys (except FFV guys)... ever!

 

(I mentioned a workaround where I was "teleporting the cargo guys out and back in directly after the doFollow", but that looked pretty ridiculous visually plus came with other unwanted side-effects.)

 

I like kju's idea of simplified commands to accomplish these ends... especially dissolveSubGroup(s).  (Or of course a fix for doFollow.)

 

Share this post


Link to post
Share on other sites

Hmm... If i remember right i had this kind of problem during my T.C.L. coding time too and as far as i remember i solved it by using a "_group move _position"; directly after the "doMove / doFollow" command.

 

This allowed me to use doMove / doFollow command and keep all A.I. unit(s) in the vehicle.

 

I can tell this cuz i had scenarios where the driver of a vehicle wasn't the A.I. group leader so in this case the vehicle did not move by using the "move" command but "doMove" worked well except A.I. get out and get in the vehicle.

 

Adding the "move" command right after the "doMove" solved the disembark A.I. behaviour and allowed me to make the vehicle drive even if the A.I. group leader was in cargo or gunner position of the vehicle.

  • Like 1

Share this post


Link to post
Share on other sites

@madrussian @.kju @snkman
In case this doesn't get implemented, you can use `_units joinSilent _group`. This is what I use in my AI mod right now.

Note that it shouldn't be used on the group leader, because the leader will leave the group and rejoin; one workaround is to temporarily set any unit as the leader (the unit doesn't have to be a member of the squad, so you can create a helper civilian unit for the entire mission), use `joinSilent`, then select the original leader, i.e:

// _units are members of the _group that you want to return to formation
_leader = leader _group;
_group selectLeader _helperUnit;
_units joinSilent _group;
_group selectLeader _leader;


Also note that you can't use a fake helper unit (agent, random object, etc.). The helper must have a group. It's okay to use enableSimulation false on it though.

I recommend using "VirtualMan_F" as your helper (it's invisible and has no hitboxes)

  • Like 1

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
Sign in to follow this  

×