Jump to content
Sign in to follow this  
l337acc

Attach LIFT CARGO waypoint to moving vehicle?

Recommended Posts

I have a mission where an AI helicopter is going to drop off a vehicle and pick another one up. On the activation of the LIFT CARGO waypoint for the second vehicle I have:

truck1 = waypointAttachedVehicle [heli,6];

This WAS working, but since I moved the location of the AO to a new area everything is working except for this part of the mission. The AI helicopter moves over to the target vehicle and descends to pick it up, BUT it just moves down, bounces up, and just hovers over the area. How can I fix this?

 

Edit: I should mention that both vehicles are identical types, with the same mass.

Share this post


Link to post
Share on other sites
heli setSlingLoad truck1;

Gives me an error when putting it in the vehicle's init or on activation of the waypoint.

Type Bool, expected Nothing

Share this post


Link to post
Share on other sites

This command returns a boolean, therefor it needs a script handle.

_cargoLoaded = HELINAME setSlingLoad CARGONAME;

If sling loading was successful, _cargoLoaded will return true, otherwise false.

Share this post


Link to post
Share on other sites

This command returns a boolean, therefor it needs a script handle.

_cargoLoaded = HELINAME setSlingLoad CARGONAME;

If sling loading was successful, _cargoLoaded will return true, otherwise false.

 

It isn't really working the way I need it to. I need the helicopter to go to the position of the truck, which will change based on where the AI gets out.

Share this post


Link to post
Share on other sites

Maybe something like this:

heli moveTo getPos truck;
waitUntil{sleep 0.5; ((heli distance truck) < 20)};
_cargoLoaded = heli setSlingLoad truck;

Share this post


Link to post
Share on other sites

 

Maybe something like this:

heli moveTo getPos truck;
waitUntil{sleep 0.5; ((heli distance truck) < 20)};
_cargoLoaded = heli setSlingLoad truck;

 

I just gave that a try. Unfortunately it doesn't seem to work either. I've made a demo mission just to be sure:

http://www.mediafire.com/download/ytmat395f3w3pfs/CargoLiftTest.Altis.rar

 

Edit:

Here's another version with how your "supposed" to use the lift cargo waypoint (i.e. putting it directly on the vehicle). However, the problem is that the helicopter is moving to the previous truck position (beginning of where it starts) before actually picking up the truck. Even with setWaypoingPosition it keeps heading towards the truck but going back to the start position of the truck. I'm desperately trying to avoid this, because in the actual mission the truck starts off like 10km from the helicopter.

 

http://www.mediafire.com/download/6m5ctc4lj7zi5gd/CargoLiftTest2.Altis.rar

Share this post


Link to post
Share on other sites

Anyone? Bueller?

 

Heya

Sorry to resurect this old thread, but you find a solution to this issue? I have the exact same problem. Specifically a moving object to lift. I'm hoping to avoid having to build a custom script for this.

Share this post


Link to post
Share on other sites
On 9/6/2015 at 5:55 PM, l337acc said:

 

I just gave that a try. Unfortunately it doesn't seem to work either. I've made a demo mission just to be sure:

http://www.mediafire.com/download/ytmat395f3w3pfs/CargoLiftTest.Altis.rar

 

Edit:

Here's another version with how your "supposed" to use the lift cargo waypoint (i.e. putting it directly on the vehicle). However, the problem is that the helicopter is moving to the previous truck position (beginning of where it starts) before actually picking up the truck. Even with setWaypoingPosition it keeps heading towards the truck but going back to the start position of the truck. I'm desperately trying to avoid this, because in the actual mission the truck starts off like 10km from the helicopter.

 

http://www.mediafire.com/download/6m5ctc4lj7zi5gd/CargoLiftTest2.Altis.rar

 

The CargoLiftTest2 version working perfectly. Nice work! 😉

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  

×