OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mattheus on 11 Jan 2005, 10:08:18

Title: Individualize listed elements
Post by: Mattheus on 11 Jan 2005, 10:08:18
Scripting problem :

I would like to assign a local variable for each element which is in a trigger.

So :
_units = list mytrigger
Then, it's easy to make them appear with using the "hint" command. So it could be possible to individualize these elementsâ€Â¦ I thinkâ€Â¦

I would like also check if these elements are ground vehicles. I've seen in the Command Reference, in the list of CfgVehicles, the value "land" for ground vehicles. How can I use it (syntaxâ€Â¦) ?

Thanks for any help.
Title: Re:Individualize listed elements
Post by: macguba on 11 Jan 2005, 12:08:44
_units0 = _units select 0
_units1 = _units select 1

There is a cunning way to generate a list of numbered variables _list0, _list1, etc. but I can't remember exactly how to do it.    Try the forum search function and be persisent.    I think it involves the format command.

IIRC its a countType command for checking if they are land vehicles.    Example in the forum in the last week or so.
Title: Re:Individualize listed elements
Post by: Mattheus on 11 Jan 2005, 13:14:33
_units0 = _units select 0
_units1 = _units select 1

There is a cunning way to generate a list of numbered variables _list0, _list1, etc. but I can't remember exactly how to do it.    Try the forum search function and be persisent.    I think it involves the format command.

IIRC its a countType command for checking if they are land vehicles.    Example in the forum in the last week or so.

A big thanks to you, macguba. How can you be so omnipresent ?
Do you know what "sleep" means ?  ;)
Or maybe there are sereval macgubas...  ;D