TR UNLOAD not working. Unassignvehicle not working.
Below is a script. The point is for it to create a group of BMPs with seperate infantry groups in the back. The BMPs are supposed to get waypoints and follow them. One of these waypoints is supposed to be a "TR UNLOAD" waypoint so the infantry will disembark and then go to their own waypoint. However, I have been unable to get the TR UNLOAD waypoint to work. So I tried using unassignvehicle. The infantry gets out of the BMP if I change the script so that the unassignvehicle part is outside of a waypoint but fails to work if I change it so that they should get out at the waypoint.
Putting them in the same group is an undesirable option for many reasons with the most important one being that they will drop their men into the water if they are going through water and spot an enemy. The most desirable option is for TR UNLOAD to work but for whatever reason it doesn't when put inside a script.
Funnily enough I was also trying to get a scripted "TR UNLOAD" to work last night.... no joy. Tried for hours and eventually gave up. I ended up using this as the Waypoint Statements and it worked well enough for my purposes.
Funnily enough I was also trying to get a scripted "TR UNLOAD" to work last night.... no joy. Tried for hours and eventually gave up. I ended up using this as the Waypoint Statements and it worked well enough for my purposes.
EDIT: Okay I got twirly's code working for the lead BMP. But for some reason the other two BMPs won't unload their troops. I even copied the _wptext thing two more times and changed the 0 at the end to 1 and 2. Shouldn't that work or am I misunderstanding it?
The thing that really pisses me off is this:
I put a mechanized infantry group down. Took the bmp out of the group. Put this in the init field: bmpgrp = group this;
I put this in the init field of the infantry: {_x moveInCargo bmp} forEach units this
I put in a radio Juliet trigger with this: wpi = bmpgrp addwaypoint [getMarkerPos "wp0",20]; wpi setWaypointType "TR Unload"; wpi setWaypointSpeed "Full";
That works perfectly. The BMP goes to the marker wp0 and drops off the troops. But when I use TR Unload in a script it doesn't work.
The BMP moves to wp0 and units getout and BMP then moves to wp1, infantry move to wp1.
I have run into a problem when trying to get multiple groups to work.
The vehicles work and the units get out but for some reason the infantry stay put and don't move to waypoints.
For this I have to name the leader of the group and then use this line wpinf = group _grp addwaypoint [getMarkerPos "wp2",20];
The BMP moves to wp0 and units getout and BMP then moves to wp1, infantry move to wp1.
I have run into a problem when trying to get multiple groups to work.
The vehicles work and the units get out but for some reason the infantry stay put and don't move to waypoints.
For this I have to name the leader of the group and then use this line wpinf = group _grp addwaypoint [getMarkerPos "wp2",20];
What happens if you have the BMP spawn though using createunit? Does it still work? I'm wondering if that might be the problem. Because I can get it to work with a BMP and group that starts out in the mission but not ones created using createunit it seems.