Jump to content
JB47394

Using west faction units as east units in transport vehicles

Recommended Posts

I've got a CUP CDF transport.  CDF is a west faction.  I have a driver group for the driver, and a passenger group for the back, both from CDF units.  They are each created in turn and the units are moved into the transport.  If both of those groups are side west, then everyone loads up and the vehicle drives off happily.  If both of those groups are side east, then about 50% of the time, the leader of the group in back will dismount almost immediately.  As it doesn't always happen, I'm assuming that there's some kind of timing issue within ARMA.

 

Has anyone seen this, and does anyone have a workaround for it that doesn't involve modding CDF into an east faction or creating east units with CDF gear or anything else draconian like that?  The mount process involves createGroup east, createUnit into the group, addVehicle the transport to the group, and the appropriate assignAs and moveIn commands to load the units.

Share this post


Link to post
Share on other sites

After creating units, it's always preferable to make them join the group (I know it's seems useless to add this extra line...).

  • Thanks 1

Share this post


Link to post
Share on other sites

Yeah, that's always been in there.

 

I went through a long list of possibilities, including allowGetIn, orderGetIn, allowCrewInImmobile, seat locking and even disableAI "all".  Even disabling the AI doesn't slow them down at all; they go through a dismount animation anyway, then freeze.

 

I eventually got the passengers to stay in the vehicle.

 

The way that was not working was to create a unit in the group, joinSilent the group, stuff the unit into the vehicle, repeat.

 

The way that now works is to create a unit in the group, joinSilent the group, repeat.  When I have the entire group assembled, sleep for 0.1s * number units in the group, then stuff all the units into the vehicle.  This is only done if the unit faction is not the same side as the group.  If the sides are the same, the sleep is skipped.

The sleep delay was determined experimentally.  I have a one-unit driver group and a 10-unit passenger group.  I noticed that the driver group was never dismounting, while the large group required at least a 0.9 second delay.  So I tried the 0.1s per unit and it worked in my editor tests for a few different sized groups.

 

I detest the heebie-jeebie incantation approach to making this work, so if anyone knows what condition I need to actually wait for, I'd appreciate a reply here.

  • Like 1

Share this post


Link to post
Share on other sites

I did also my own function spawning group (units/vehicles) . It's mandatory if you want to spawn vehicles in towns or units out of rocks, and I did the same process as you with the sleep 0.1 between each createVehicle or createUnit (with no check at all for side and a joinSilent for all).

In MP, I don't have any more problem like units fighting against each others in the same group! (That was possible in case of the type of unit doesn't matter, so regardless of BLUFOR or OPFOR at origin).

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

×