Home   Help Search Login Register  

Author Topic: ForEach ThisList Question  (Read 699 times)

0 Members and 1 Guest are viewing this topic.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
ForEach ThisList Question
« on: 28 Jan 2004, 17:52:12 »
As the topic implies, I need some help understanding this command. ???

Does it make a list or array of the units for the condition of the trigger that calls this command?

To clarify, if I want to direct spawned units to a new position after the enemy has been eliminated from a village, can I make a trigger with condition "East not present" and condition "_x domove (getpos here)" foreach thislist to get the West units in the trigger area to move to a GL named "here"?

Or will this make a list of the dead east units and nothing more will happen?

Or do I need to activate a trigger using something like:

Type: East not Present
Activ: moveon = true

...then use foreach thislist as so:

Type: West Present
Cond: this and moveon
Activ: "_x domove (getpos here)" foreach thislist

...to only get the remaining spawned units to move to the next objective?

If someone has a better solution, I am open to a new suggestion!

Thanks in advance for any and all help!


                                                                 Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:ForEach ThisList Question
« Reply #1 on: 28 Jan 2004, 19:13:10 »
ThisList creates an array of all the units in the trigger, that would activate the trigger.

In your example, all the west units would be ordered to Move to the position Here.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:ForEach ThisList Question
« Reply #2 on: 28 Jan 2004, 20:41:56 »
Thanks for the quick reply although I need a little clarification.

Quote
ThisList creates an array of all the units in the trigger, that would activate the trigger.

If my trigger is activated when all the east units are dead, then a lack of east units activated the trigger, right?

Quote
In your example

I gave two examples, one with the "East not Present" and one with two triggers. Which example are you referring to? I believe that you are referring to the two trigger example as "West Present" (or "Anybody Present" as I may use a mixture of West and Res units) would then create an array of the West units present in the trigger area and send them on their way to the next objective.

Thanks again for your help!

                                                              Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:ForEach ThisList Question
« Reply #3 on: 28 Jan 2004, 21:15:46 »
Icarus means your second, two trigger example.

To illustrate the point, create a trigger, east not present.   Make sure there are not east units in the trigger area.

On activation:   hint format ["%1", thislist select 0]

and see what you get.  ;)    Now play around with the format command and various triggers.
Plenty of reviewed ArmA missions for you to play

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:ForEach ThisList Question
« Reply #4 on: 28 Jan 2004, 21:36:00 »
Quote
Icarus means your second, two trigger example.

That is what I thought he meant.

As I post from work and play at home, I will check it out tonight (if time permits :() and close this topic tomorrow. Thanks again!

                                                   Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:ForEach ThisList Question
« Reply #5 on: 30 Jan 2004, 20:08:05 »
Well I had a nastsy blue screen physical memory dump while working on my mission and now the mission CTDs me every time! >:(

It is strange that every other mission still works though. ???

I have not had the time to fix this but I am pretty sure that I got the answer I was looking for so I will go ahead and close this thread.


                                              Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.