Jump to content
thirith

How to keep AI from disembarking when the gas tank is empty

Recommended Posts

I'm currently working on a helicopter mission where you're ferrying around AI units, racing other players. I've added an action that allows you to repair the helicopter if it's damaged; it deactivates the helicopter by setting fuel to 0, sleeps for 10 seconds, then refuels and repairs the helicopter. (The action only works if the helicopter is on the ground.)

 

This works well - except for one thing: as soon as the helicopter is damaged or the fuel set to 0, any AI passengers disembark the helicopter. I've tried passenger disableAI "FSM", but it doesn't change anything: the moment the fuel drops to 0, the passenger gets out.

 

Any way I can keep this from happening? I've seen a couple of possibilities, but they all seem to have drawbacks, in particular for the setup of my mission: you fly to waypoints A, B, C and D, picking up one passenger at each waypoint. If I were to lock the cargo slots during repairs, I imagine that new passengers couldn't get in either.

 

Any tips would be much appreciated. Cheers!

Share this post


Link to post
Share on other sites

Heh. I probably have a tendency to over-complicate things... I think it'll be a fun, unconventional mission, though - so few opportunities for small groups to use Littlebirds in regular missions.

 

Anyway, I've got a couple of potential solutions now, and I'll have to see which one works best:

  • At the end of the repair script, check which passengers are near the helicopter but not on board, and then order those to get in again. (In the briefing text, I can say that passengers aren't stupid and they'll disembark any damaged or repairing vehicle for their own safety, but they'll get back in again after a helicopter's been repaired.)
  • I could make the passengers join the player's group, in which case they should stay on board, and then have them leave the group just before the final waypoint.

I'll see which works okay.

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

×