Jump to content
Sign in to follow this  
meatball

Boat not moving after "unload transport" waypoint

Recommended Posts

Working up a mission that starts off with the team on board an AI speedboat which has waypoints to move to shore and do a "Transport Unload". Everything works fine, the boat comes up to shore, gets close and everyone gets booted out of the boat. Problem is, the boat never leaves. It has another waypoint to move out to sea after the Transport unload, but that never seems to fire and I can't figure out what the deal is. Any thoughts?

Share this post


Link to post
Share on other sites

Why not have it move away after unloading? You can use the sleep command to create a slight delay

Sent from my ADR6300 using Tapatalk 2

Share this post


Link to post
Share on other sites

Thread moved. Please post in the correct section and use descriptive thread titles in the future. Thank you! :)

Share this post


Link to post
Share on other sites

Sorry, thought I was in the right section. I'm still using Alpha, thought Beta wasn't out till tomorrow though Steam.

Share this post


Link to post
Share on other sites

You posted in a section related to finished mods and not simple waypoints/mission scripting ;)

Share this post


Link to post
Share on other sites

Ah...my bad, thanks for the redirect and update to the heading! :)

Share this post


Link to post
Share on other sites

No problem, that's what I'm here for :)

Either way, back to your problem. Have you tried the suggestion already?

Share this post


Link to post
Share on other sites

It's usually because the drive up past the point of no return. They get stuck. Try making the waypoint a little further away from the shore. Also it could be because the waypoint might not have been triggered. If enemy is around, the infantry tend to get out asap. So they might get out slightly before unload is triggered. But most likely it's cause they are too close to shore. Basically the AI is like an 80 year old trying to leave a parking place. They back out turning slightly, then move forward, then backup, then forward and after 3 or 4 tries they finally get out of the spot, while it takes a young driver 1 try. Give the boat more room. let the infantry out while still in the water a ways out.

However, the boats are a pain in the butt. They don't drive straight. I had 3 boats, each with straight waypoint paths. Yet everytime the move they cross each others paths for no reason. Also when they get to a waypoint their momentum carries them past it and they stop and back up a little then resume. I've had to make the "unload" waypoints with 20 area completion radius. They rarely land where they are supposed to. So they drive to shore and just park with everyone still inside just because they are 10 meters away from waypoint. I've tried everything from "safe" to "stealth". The only way I have gotten good results is when you set their speed to "limited".

In case anyone wonders, most of these incidents happed at shore of Girna.

Tell me how you set it up. Is the boat and infantry in same group or different group? If different, How did you get them in the boat. The reason I ask is because I also have a hard time trying to get infantry out of boats when they are in separate groups. I think I got it working but not sure how. I accidentally deleted mission when I tried modifying my user name. I think I only got it to work when everyone in the boat was on same team.

Share this post


Link to post
Share on other sites
It's usually because the drive up past the point of no return. They get stuck. Try making the waypoint a little further away from the shore. Also it could be because the waypoint might not have been triggered. If enemy is around, the infantry tend to get out asap. So they might get out slightly before unload is triggered. But most likely it's cause they are too close to shore. Basically the AI is like an 80 year old trying to leave a parking place. They back out turning slightly, then move forward, then backup, then forward and after 3 or 4 tries they finally get out of the spot, while it takes a young driver 1 try. Give the boat more room. let the infantry out while still in the water a ways out.

However, the boats are a pain in the butt. They don't drive straight. I had 3 boats, each with straight waypoint paths. Yet everytime the move they cross each others paths for no reason. Also when they get to a waypoint their momentum carries them past it and they stop and back up a little then resume. I've had to make the "unload" waypoints with 20 area completion radius. They rarely land where they are supposed to. So they drive to shore and just park with everyone still inside just because they are 10 meters away from waypoint. I've tried everything from "safe" to "stealth". The only way I have gotten good results is when you set their speed to "limited".

In case anyone wonders, most of these incidents happed at shore of Girna.

Tell me how you set it up. Is the boat and infantry in same group or different group? If different, How did you get them in the boat. The reason I ask is because I also have a hard time trying to get infantry out of boats when they are in separate groups. I think I got it working but not sure how. I accidentally deleted mission when I tried modifying my user name. I think I only got it to work when everyone in the boat was on same team.

Use more waypoints to get them to follow pathing better. You can also have then join a squad or leave a squad if needed during transportation but I don't believe that is required

Sent from my ADR6300 using Tapatalk 2

Share this post


Link to post
Share on other sites

Alright, I figured this out, basically what's happening is the AI pathing for the boat isn't smart enough to actually back up off the shore before trying to make the turn and heading back out to see at the next waypoint, so it sits there, stuck. I was able to figure out a way around that, but it's a giant kludge to say the least.

In my example, I have a bunch of AI troops that I'm loading into a boat that I've named 'boat1'.

First thing to do is to use both a 'movincargo' and 'assignascargo' for any units you want to start in the boat. In the initialization field for each of those units, put the following, "this moveincargo boat1;this assignascargo boat1;" Apparently if you don't use 'assignascargo' in addition to the 'moveincargo' the AI in the boat/troops does not actually recognize the units are actually on board and need to get out at the 'transport unload' waypoint.

Next, set up your move waypoints to get towards shore and put a Transport Unload waypoint near the shore and then a move waypoint back out at sea for the boat to take off after unloading to. You need to be careful with two things on the Transport Unload waypoint though. First, make sure the boat is coming in slow with 'Limited' speed for the Transport Unload waypoint so it doesn't ground itself too far up on the shore. Second, try to have the boat come in as perpendicular to the shore as possible so it can be pushed directly backwards in the next step without crashing into anything.

Finally, set the Timeout of the Transport Unload waypoint to 5 for Min/Mid/Max, and in the "ON ACT" field put "boat1 setVelocity [15,0,0];" This will give the units 5 seconds after the boat unloads to get out of the way and then shoves the boat back off shore directly backwards the direction it came in. Now free of the shore and with no passengers, the boat will move on to the waypoint you set out at sea. (If you want to see something funny, set the velocity to [100,0,0] or better yet [-100,0,0] :))

Looks kinda cheesy to be honest, but it works. You may need to experiment with the direction/angles of your waypoints coming into shore and setVelocity value depending on the formation of the coast the boat will be unloading on. Not pretty, but it's the only way I could figure out how to make it work.

Edit: One other quick comment. You may want to set the boat's Vehicle Lock to "Locked" so the players can't take over the helm or any of the other spots.

Edit 2: I figured something out just recently that set velocity may not actually work for you depending on the cost, the setVelocity takes [x, y, z] coordinates. x will be East/West, y will be North/South and z will be up down. So if you're coming in to a coast with the bow of the boat facing due south, you're going to want your setVelocity to be [0,10,0], if it's facing north, it'd be [0,-10,0], facing east, [10,0,0], west, [-10,0,0]. I'm sure there's a way to calculate that based on the direction of the boat, just a matter of experimenting and figuring it out.

Edited by MeatballCB

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  

×