Yeh - sorry, but eventhandler "eject" doesn't exist i believe.
There's an eventhandler "GetOut'", but i'm not sure if the
action "eject" is covered by the getout event.
Kyle, i'm trying now to show you what i mean with using arrays.
(don't think about using the exact same model for you, just
try to imagine if something like that could help you).
An array is a vektor with positional parameters, like
my_array1 = [a,b,c]
Now there are 3 parameters, which can be selected by
my_array select 0 - 2
let's make two more arrays for later use:
my_array2 = [d,e,f]
my_array3 = [g,h,i]
Then there are even more complex arrays, consisting of
sub arrays:
my_array = [my_array1,my_array2,my_array3]
this array would look like:
my_array = [[a,b,c],[d,e,f],[g,h,i]]
This array consists of 3 sub-arrays, where each of it consists
of 3 parameters.
Now let's say the first parameter of each sub-array contains
the type of a plane;
my_array1 select 0 = SU_25
my_array2 select 0 = A10
my_array3 select 0 = C-130
:note - the name of the planes are just fantasy names,
for your script you still need to find out the type, you need.
The second parameter of each array could then be used
to define the seat-type, and the third one for the canopy.
my_array1 select 1 = "su25-seat"
my_array2 select 1 = "a10-seat"
my_array3 select 1 = "c130-seat"
my_array1 select 2 = "su25-canopy"
my_array2 select 2 = "a10-canopy"
my_array3 select 2 = "c130-canopy"
Now once your ejection-action has been triggered, as you
already figured out, the owner of the action (the plane) is
passed automatically to the script.
All you have to do is:
compare the vehicle, owning from where the action has been
called against the first parameter of each sub-array - once you found the right sub-array, take seat- and canopy type from this sub-array to be used in your script.
That's why unnamed and me replied about the "if-statement".
_plane = _this select 0
{If (vehicle _plane) == _x select 0) Then {_seatt = _x select 1; _canopyt = _x select 2}} ForEach my_array
[_plane,_seatt,_canopyt] exec "ejection.sqs"
Now what will happen?:
custom action is called from an A10
script says: _plane = the plane, from where the action has
been called
Now the script checks, which first element of the three sub-
arrays in my_array does match to the script-owner.
In this case it's the second sub-array:
my_array2
Now the script will assign parameter 2 and 3 of my_array2
to _seatt and to _canopyt
Followed by starting the ejection.sqs with passing the correct
parameters.
voila
hope this helps
:edit - just fixed a missing "select 0", and added an exec statement, using the array you want to pass the correct
parameters. Also i've updated the arrays to match with your
idea of how to get it to work.
~S~ CD