Kyle, i think it's time now that you first explain "exactly"
what you want to do.
There are a lot of suggestions in this thread, which should
(could) have been help for you, but then again it looks
like you want to do something really different to what
everybody else is thinking here.
The suggestion by unnamed (using global arrays in combination
with subarrays), looks very good in case if i understand
your problem right (not sure about that though ;D).
Also as unnamed said: _currGuy = this select 1
he's refering to the "caller" of the action, what i mentioned
above too.
I'll give you a summary now of what unnamed tried to tell ya:
step 1: initialize an array in init.sqs - AmmoList = []
step 2: put everything you want into this array, using it's
init field: AmmoList = AmmoList + [[this,"M16"]]
Now you have created even an array with it's subarray.
e.g: [[guy1,"m16"],[guy2,"G36"],[guy3,"ak74"]]
Now this array can be accessed that way:
AmmoList stands for the whole array with it's subarray
AmmoList select 0 stands for: [guy1,"m16"]
and so on.
step3 - _param1 addaction ["ReArm","variable.sqs"]
Will start the script: variable.sqs
step4 - do whatever you want by using the if statement
In case of unnamed's suggestion there's one little error,
as AmmoList select 0 is not only the unit he wants to refer to,
rather than a whole array itself [guy1,"m16"]
{If ((_x Select 0)==_CurrGuy) Then {_CurrGuy AddMagazine (_x Select 1}} ForEach AmmoList
One way around here would be to create two seperate
arrays, and another way around could be to divide the
array AmmoList temporarly into two seperate ones, once
rearm.sqs gets started.
I have to go to work now, so i can't get more into detail
at the mo, but i'll be back later to see if i can help ya further
(or just to see that you've clicked the solve button
)
I know it may look quite complicated now, but as i said;
post a more detailed explanation about what you wanna
do, and maybe there's an easier way at all, depending on
your prob.
~S~ CD