Jump to content
Sign in to follow this  
NightIntruder

Automated ejection of aircraft crew under certain circumstances

Recommended Posts

What I am trying to achieve, and yet failed, is having automated crew ejection of any AI-controlled aircraft after either unsuccessful trap on carrier or cold shot from catapult. That's why I am looking for generic approach based on trigger placed in the editor.

Activated by: WEST; Repeatedly

Present

Cond: this

Activation:

{if (_x isKindOf "Air")then{while {count (crew _x) > 0} do {((crew _x) select 0) action ["eject", _x];};};} forEach thisList;

The trigger above works however I'd like to add a couple of conditions to meet, as follows:

- aircraft's speed must be above 50 kph and below 150

- aircraft's altitude MSL must be below 12

It seems to be easy but I couldn't find a right track throughout the morning. Could you help me out with this, guys?

Share this post


Link to post
Share on other sites

Hi there,

a small sqs loop will do the job. This is what Saul and me done to make AI pilot "bail out" in case plane is damaged. Add few conditions by you and attach it via init to unit, should do the job. Just don't make it per frame add a small delay/sleep timer on each cycle.

//LOOP TO MAKE SURE AI EJECTS IF PLANE IS HIT

while {true} do

{

If ((damage _SU35 > 0.85) and (player != driver _SU35)) then {[_SU35] spawn JS_JC_fnc_SU35_Ejection;};

If !(alive _SU35) ExitWith {};

sleep 1.0;

};

Share this post


Link to post
Share on other sites
Hi there,

a small sqs loop will do the job. This is what Saul and me done to make AI pilot "bail out" in case plane is damaged. Add few conditions by you and attach it via init to unit, should do the job. Just don't make it per frame add a small delay/sleep timer on each cycle.

Thanks for help John! Actually, you've pushed me to right track coz I saw my damn mistake within the code. Anyway, I've stayed with my original trigger-based idea as I need to have the effect around a carrier only, in the same time any delay might be extremely dangerous for the crew :)

I am just wondering why I had doubled ejection effect easily seen on the video... May it be something to do with aircraft's ACE config? Hm...

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  

×