Home   Help Search Login Register  

Author Topic: Individualize listed elements  (Read 478 times)

0 Members and 1 Guest are viewing this topic.

Mattheus

  • Guest
Individualize listed elements
« 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.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Individualize listed elements
« Reply #1 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.
Plenty of reviewed ArmA missions for you to play

Mattheus

  • Guest
Re:Individualize listed elements
« Reply #2 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