Jump to content
Hybrid V

AI Bailing From Damaged Chopper/Vehicle To Their Doom

Recommended Posts

One of the missions I'm working on has a scripted event where the player's helicopter is shot down by a missile, not enough to destroy the chopper but enough to disable it, then after a few seconds of the AI losing control a script I wrote takes over to control the decent and simulate a tail rotor failure. The problem is that any AI in cargo will all instantly bail after the missile impact to their deaths since the vehicle is at this point disabled.

 

I've been trying for a few days now to work around this issue, an issue which has been hilarious to watch over the years and past titles since OPF (at least they had parachutes then!), but now these days it just looks absolutely ridiculous, considering that BIS thinks it is more realistic to have soldiers jump from a helicopter to their death then say... try to do that at lower altitudes or something where one would think they would have some remote shot of surviving, but I digress.

 

Any way, if I recall this is a hard coded issue right? Has anyone ever found a usable workaround for the problem? I tried searching but not much ever surfaced that was useful or worked. I've tried disabling AI such as FSM or locking the vehicle, allowCrewInImmobile works well mostly for tracked or wheeled vehicles and has no real effect on helicopters since the crew stays in the doomed chopper anyway but does not seem to effect the cargo either for choppers. Setting the unit to CARELESS is useless as well. I thought about script that would reset the damage and replace the infantry back into cargo positions but if hazard a guess it would mostly just look janky at best and world not feel natural, I could cover it up with effects but I want to keep the action feeling fluid and natural.

 

Any one been able to skirt around this issue? I'm tempted to just abandon the whole idea together but I figured I fire off the question here first before I shelve the mission.

Share this post


Link to post
Share on other sites

nvm misread that you had already tried it

Share this post


Link to post
Share on other sites

Sorry, I also didn't read the post carefully enough. :rolleyes:

Disabling simulation for the cargo crew might work but they'd freeze which would break immersion a bit. Or maybe try if lockCargo isn't different from lock?

Share this post


Link to post
Share on other sites

Yeah disabling simulation doesn't stop them from hopping out, they just end up floating in the air which looks hilarious, also lockCargo does not work either :\

Share this post


Link to post
Share on other sites

Maybe there's too much damage on the chopper?  In my Property of Mabunga mission, I've taken hits on littlebirds dozen of times, where tail rotor taken out and AI pilot sucessfully lands without cargo uints jumping out.

 

Since your scripting the crash landing, try doing it with less damage on the chopper (I'm guessing there's  a damage threshold where BI forces Cargo out).

Share this post


Link to post
Share on other sites

Yeah that is the case.

Too badly damaged vehicles always threw out the crews, even if the vehicle itself was still operational, if the tracks were busted, the AI thinks the vehicle is busted and some auto-bail kicks in.

 

But this will prevent them from leaving:

this lockdriver true;
this lockcargo true;

this lockturret [[0],true];
this setvehiclelock "LOCKED";

 

The turret part gets a bit confusing, because I can never immediately figure out which seat/gunner/etc. is which "turret", so you may have to experiment with "lockturret [[-1],true]" and all the others that come in mind. I think 4 or something is the max number? There is a way to list/diag_log all turrets on a vehicle, but that's just something else.

 

Since you want to do it on "no turret vehicles", the code is good the way it is.

  • Like 1

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

×