Jump to content
Sign in to follow this  
LuckyArma

How to pick up AI while hovering?

Recommended Posts

I get the AI to load into my heli after I land by using isTouchingGround, but I have no idea how to handle the same trick while hovering.

 

Could someone point me in the right direction?   I know there's probably a command for it, but the list is so long, and the examples are so few.

 

Thanks.

Share this post


Link to post
Share on other sites

You can test if hovering low by checking height:

getposatl heli select 2 < 1

If AI do not want to board the helicopter after hovering condition is met, then you need force them (moveTo, moveInCargo, assignAsCargo).

Share this post


Link to post
Share on other sites

Yeah, I'm assigning them as cargo once  the heli touches down, then unassigning them at their drop off point so they'll get out again.

 

I'll give the getposatl variable a try.

 

Thanks

Share this post


Link to post
Share on other sites

normally if the Helo is hovering just off the ground, they automatically get ported inside the chopper anyway once they reach the part where the interaction menu opens, I've noticed this a few times, and the animation for it sucks too. You don't actually see them climb aboard.

Share this post


Link to post
Share on other sites
On 12/24/2016 at 8:33 PM, road runner said:

normally if the Helo is hovering just off the ground, they automatically get ported inside the chopper anyway once they reach the part where the interaction menu opens, I've noticed this a few times, and the animation for it sucks too. You don't actually see them climb aboard.

 

Yes, they just sort of teleport aboard which is arcadish.   I don't see any interaction menu, and I'm glad I don't, because that would be even more arcadish.  

 

Anyway, I got the guy to load in the chopper, with onActivation, allowGetIn, assignAsCargo, and orderGetIn, but he doesn't always get in if the weather is so bad that he has time to swim out of the trigger area.   Running the mission close shore he'll swim out and walk ashore, then he won't get in even if I land, prolly because he's out of  the trigger area, which makes sense, because why use a heli to rescue someone who's close enough to shore to swim out; right?  So I will just put him further out to sea and extend the activation zone on the trigger.

Share this post


Link to post
Share on other sites
2 hours ago, LuckyArma said:

 

Yes, they just sort of teleport aboard which is arcadish.   I don't see any interaction menu, and I'm glad I don't, because that would be even more arcadish.  

 

Anyway, I got the guy to load in the chopper, with onActivation, allowGetIn, assignAsCargo, and orderGetIn, but he doesn't always get in if the weather is so bad that he has time to swim out of the trigger area.   Running the mission close shore he'll swim out and walk ashore, then he won't get in even if I land, prolly because he's out of  the trigger area, which makes sense, because why use a heli to rescue someone who's close enough to shore to swim out; right?  So I will just put him further out to sea and extend the activation zone on the trigger.

Ah.......are you trying to get him to board when the chopper is hovering over water? I have a feeling that's maybe different due to collisions, I've had the opposite when helo casting, 3 out of 4 get out, and the last one keeps being an asshole, and sits inside.

Share this post


Link to post
Share on other sites

Yes it's a water extraction.   To get ai's to unload I unassign all passengers from the helicopter.

 

The only problem I encountered that way is when I land on the rooftop heli-pad at Kavala, once the ai gets out he will walk right off the roof, unless you assign him a waypoint that keeps him on the roof.

Share this post


Link to post
Share on other sites
11 minutes ago, LuckyArma said:

Yes it's a water extraction.   To get ai's to unload I unassign all passengers from the helicopter.

 

The only problem I encountered that way is when I land on the rooftop heli-pad at Kavala, once the ai gets out he will walk right off the roof, unless you assign him a waypoint that keeps him on the roof.

Yeah, I remember this annoying problem. Using waypoints are your best bet. I think I created a function once that would constantly look 1m ahead of an AI and see if there was a drop greater than 5m. If there was it was forcespeed 0, turn them around, and move them 1m back. I believe this had obvious problems though...

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  

×