Home   Help Search Login Register  

Author Topic: learning to use array's  (Read 408 times)

0 Members and 1 Guest are viewing this topic.

robliverob

  • Guest
learning to use array's
« on: 04 Dec 2003, 01:50:47 »
I would like to know the best tutorial for learning to use array's. :)
« Last Edit: 04 Dec 2003, 01:51:12 by robliverob »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:learning to use array's
« Reply #1 on: 04 Dec 2003, 01:54:47 »
Try the Editors Depot for any type of tutorial.

In this case try here:

http://www.ofpec.com/editors/browse.php?category=1_3


Planck
I know a little about a lot, and a lot about a little.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:learning to use array's
« Reply #2 on: 04 Dec 2003, 11:09:02 »
There is a section in the command ref about array types.   The problem with learning about arrays is that they are so simple - it's not the array itself that's the problem, its what goes around it.

An array is just a list.    If you want to list each item individually you have to put them in square brackets like this [ ]

[loon1, loon2, loon3]

Sometimes a command or group of commands returns an array.  For example

getPos loon1

A trigger automatically returns an array of the unit(s) that have fired the trigger.   The array is called thislist.    So in the On Activation field of a trigger you could have

"_x setBehaviour {safe}" forEach units thislist

Hope that gets you started.  ;)  
Plenty of reviewed ArmA missions for you to play