Home   Help Search Login Register  

Author Topic: Using Arrays  (Read 655 times)

0 Members and 1 Guest are viewing this topic.

Matt_Skillett

  • Guest
Using Arrays
« on: 07 Feb 2003, 00:22:57 »
CAn anyone help me with how to use arrays in a mission. ive read a few help guides but they havent helped too much. All i want it for is so that when a group/the enemy gets below a certain number a trigger will activate? i'm ok wit the editor but not too sweet on the code.

Thanks

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Using Arrays
« Reply #1 on: 07 Feb 2003, 00:52:33 »
Arrays are one of my betes noire.   Fortunatly I seem to get  by most of the time and for what you are asking it's not a big deal.     You need code, but only one line and its very easy.    In the condition field of you trigger write

condition:   count units theGroup < 3

or something - I can never remember the exact syntax for anything, so look it up in the command reference.   But that's basically what you want.     If the vital number was the total number of loons in two (or more) groups you would have

condition:     (count units Group1)+(count units Group2) < 5

again check the syntax.

If it was the total number of baddies on the whole map, then make a big trigger covering the whole map

activation:    East present       Repeatedly
condition:   thislist < 6

as with ever answer I give, check the syntax, you may have to play with it.

Hope that all makes sense.  :)

Have a look at Johan Gustafsson's scripting tute in References, if you haven't already, that might help.
Plenty of reviewed ArmA missions for you to play

Rodd

  • Guest
Re:Using Arrays
« Reply #2 on: 07 Feb 2003, 01:23:44 »
macguba has the correct syntax.
For that last condition insert a count as the first word yourself  ;)

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Using Arrays
« Reply #3 on: 07 Feb 2003, 03:10:07 »
don't look at me, it was pure luck .... ;D

count thislist < 6
Plenty of reviewed ArmA missions for you to play