Jump to content
Babylon1984

Force the pilot to eject from the aircraft

Recommended Posts

Hello everyone,

I would like to create a mission where the goal is to rescue an aircraft pilot. In the introduction, the pilot will need to eject from the aircraft using the ejection seat.
I'll handle the rest!

The idea is to use a pilot with a waypoint circuit. For example, when he reaches his third waypoint, he will eject.

Here's how I've proceeded so far:


The pilot :
- Variable Name : Pilote01
- Init:

this setIdentity "Pilote01";

The aircraft :
- Variable Name : Raptor1
- Init:

this setIdentity "Raptor1";

Inside the third "MOVE" waypoint :

- On Activation:

AI_PILOTE_EJECT = true;

A trigger :
- Variable Name : Raptor1_wreck
- Condition :

AI_PILOTE_EJECT

- On Activation:

Raptor1 setDamage 0.9; [Pilote01, Raptor1] call BIS_fnc_ejectionSeatRelease;

Unfortunately, if I use the command call BIS_fnc_ejectionSeatRelease, the pilot is ejected from the aircraft but without his seat and without a parachute...
There must be a way to replace this command?


Thank you in advance.

Share this post


Link to post
Share on other sites

Seems like BIS_fnc_ejectionSeatRelease is using the moveOut command.

BIS_fnc_ejectionSeatRelease only needs one argument; 
 

Quote

Variable THIS references object to which action is attached to.



I am guessing that is the aircraft itself and only the aircraft.
Try:

[Raptor1] call BIS_fnc_ejectionSeatRelease;




Unable to test due to... Beer allergies!

 

//	from BIS_fnc_ejectionSeatRelease

params [["_ejectionSeat",objNull]]; if (isNull _ejectionSeat) exitWith {};
private _pilot = (crew _ejectionSeat) param [0, objNull]; if (isNull _pilot || {!local _pilot}) exitWith {};

moveOut _pilot;



Check-in if it works or not.
Also, make sure the poor fella has a chute, damnit!

  • Like 1

Share this post


Link to post
Share on other sites

First of all, thank you very much for looking into this for me.

Unfortunately, it doesn't work. It has the same effect:
the pilot is ejected from the plane, but the seat remains inside the aircraft.


This command would be ideal for a helicopter pilot, but not for a fighter jet pilot.

Another command? Maybe?
Cheers!

Share this post


Link to post
Share on other sites

The plane might not use the BIS_fnc_ejectionSeatRelease to do that if it is a Modded one.

Share this post


Link to post
Share on other sites

Thank you for your response,

Quote

The plane might not use the BIS_fnc_ejectionSeatRelease to do that if it is a Modded one.


This is not a modded aircraft. I checked the function of this command BIS_fnc_ejectionSeatRelease in:
https://community.bistudio.com/wiki/BIS_fnc_ejectionSeatRelease


It states:

onlyforplayer = 1;

This is an additional option for the player only. and not for the AI pilot.
You will have to look elsewhere.

Share this post


Link to post
Share on other sites
4 hours ago, Babylon1984 said:

You will have to look elsewhere.


Whom?


So sorry it didn't work out for you, brother.

I witnessed a vanilla A-10 AI eject for a tiny wee second last week.
It got GOT by a ZU-23.

Back to the drawing board for YOU?


EDIT:
Do AI go into parachute mode like players do?
Must investigate further.

Edited by Maff
  • Haha 1

Share this post


Link to post
Share on other sites

For AI pilot:
planeOfAI setDamage 0.1; planeOfAI call bis_fnc_planeAIEject;

 

This function works for damage >= 0.1 (coded condition)... and of course for planes with ejection seat.

 

So, if you need  player or NPC ejection, from a jet (here named plane1 as example):
 

if (isPlayer driver plane1) then {plane1 spawn bis_fnc_planeEjection} else { plane1 setDamage 0.1; plane1 call bis_fnc_planeAIEject};

 

EDITED

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Hello everyone!
First of all, thank you to all those who have shown interest in this post.
I think this will help other people.
 

13 hours ago, Maff said:

So sorry it didn't work out for you, brother.

It's a shame, it would have been cool. 😉


Thank you, pierremgi, your solution is very logical. I had already seen these two functions, but I didn't know how to use them.
 

13 hours ago, pierremgi said:

if (isPlayer driver plane1) then {plane1 spawn bis_fnc_planeEjection} else { plane1 setDamage 0.1; plane1 call bis_fnc_planeAIEject};


Your script checks, on the one hand, if the pilot of the plane is a player and, on the other hand, if it is an AI.


If the plane is damaged to more than 0.1 then...
If human player, we call the function bis_fnc_planeEjection
If AI player, we call the function bis_fnc_planeAIEject

😁 Awesome!! 😁

After the pilot has passed with his plane "Raptor1", on the waypoint that contains the global variable:

- On Activation:

AI_PILOTE_EJECT = true;

My trigger will be:

- Variable Name : Raptor1_wreck
- Condition :

AI_PILOTE_EJECT

- On Activation:

Raptor1 setDamage 0.9;
if (isPlayer driver Raptor1) then {Raptor1 spawn bis_fnc_planeEjection} else { Raptor1 setDamage 0.1; Raptor1 call bis_fnc_planeAIEject};

The pilot will eject from the jet with his seat and parachute! 😁 All that remains is to go and rescue him! 😃

I wanted to thank you for your valuable help regarding the ejection of pilots in ARMA 3.
Thanks to your solution, I was finally able to solve this problem that has been bothering me for a long time.

Everything works perfectly now, and it's really cool to see the results.

 

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

×