Jump to content
Sign in to follow this  
masterfulninja

Troops wont enter waiting transport

Recommended Posts

Im setting up a respawning squad that is scripted to enter a waiting transport once they respawn and get driven halfway to the objective and i cant get them to enter the transport. The way-points all fire, if there's an empty transport there they will man it without issue. From my research it looks like i need to assign them the vehicle first but because they respawn using the init line isn't an option and every time I try to assign them to the transport in the scripts it doesn't work... Ive been stuck on this two days now i really need some help.

Im using a respawn code i found online so i dont understand it 100% but i think Ive found the part that actually respawns the units and Ive added the assign right after and no luck.

_group = createGroup _side; 
{_x createUnit [ _pos, _group];} forEach _AI_unit;
sleep 2;
{_x assignAsCargo driver1} foreach _AI_unit;
{_x orderGetIn true} foreach _AI_unit;
};

Share this post


Link to post
Share on other sites

Do you need the units to actually run over and get in the transport, or could you use moveInCargo to circumvent the issue entirely?

Share this post


Link to post
Share on other sites

The code looks a little messed up to me

  _AI_unit=["B_Soldier_F","B_Soldier_F"]; 
_side = west; 
_pos =getpos  mypos;
_group = createGroup _side; 
 {_x createUnit [ _pos, _group];} forEach _AI_unit;
 sleep 2; 
{_x assignAsCargo driver1} foreach units _group;
 {[_x] orderGetIn true} foreach units _group;  

I think your mixing up the group with the type of units. I added the first three lines for testing.

Share this post


Link to post
Share on other sites

The respawn loop im using is not my own, so im trying to change as little as possible. Meaning im stuck with waypoints. Thats fine because when i put the assign command in the init line it works smoothly. Only once they respawn as new units do they refuse to enter the truck.

f2k im going to try your fix now.

---------- Post added at 01:55 ---------- Previous post was at 01:50 ----------

Thanks so much F2k, i did indeed have the wrong group targeted or wrong syntax. those variables were already defined though its just a big script i didnt want to post the whole thing.

{_x assignAsCargo driver1} foreach units _group;

{[_x] orderGetIn true} foreach units _group;

C&P this line did the trick.

---------- Post added at 03:28 ---------- Previous post was at 01:55 ----------

Actually I'm having a new problem now...

I got the first group to work perfectly (thanks again) and now im trying to copy that to a second and then third group. Ive made new scripts with a 2 at the end and copied all the relevant markers etc and renamed them for the second group as well. The scripts fire and waypoints are given and it appears to be working except now the squad leader wont get in the truck after issuing the get in order. Iver tried deleting the squad leader and making a new one and viola it works but it always kicks 1 squad member out and he refuses to board which then causes the truck not to move from the load waypoint and its ground to a halt.

What in the world would cause one member like that to not get in and for the error to essentially pass through when i try to delete and remake?

I remade the entire squad and pasted in all the relevant code and got the same problem with the squad leader then again to the subordinates after i deleted the leader a second time.... what the hell?

Share this post


Link to post
Share on other sites

Can't really answer that one as I don't know the script.

Did you use a different vehicle with a different name?

Is there more than 2 grps getting in the vehicle, I know I had an issue with that in the past.

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  

×