Home   Help Search Login Register  

Author Topic: Something like "any" in condition field?  (Read 439 times)

0 Members and 1 Guest are viewing this topic.

Offline Fire-Fox

  • Members
  • *
  • Violence is just a friend walking on the right way
Something like "any" in condition field?
« on: 22 Oct 2003, 18:09:31 »
Hi! :)

I have a general question about something that, I realized, would be useful for a lot of things. Short&Simple: Is it possible to detect if a condition is true for ANY object in an array?

Thanks for answers!  8)


[EDIT]
ok, after re-reading it I think this sounds a bit unprecise. So let's take an example.

? unit soldier1 knowsabout any unit from array of several units[/i] > 0 : soldier1 setbehaviour "COMBAT"

What would I write in the marked field?  ???
« Last Edit: 22 Oct 2003, 18:14:40 by Fire-Fox »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Something like "any" in condition field?
« Reply #1 on: 22 Oct 2003, 19:10:23 »
"unitname knowsabout _x > 0" count array > 0

while array can be:

list triggername

thislist (if the condition is used in the trigger itself)

name of array

[unit1,unit2,unit3] (a selfmade array in the condition)

units group

hope this helps

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Fire-Fox

  • Members
  • *
  • Violence is just a friend walking on the right way
Re:Something like "any" in condition field?
« Reply #2 on: 22 Oct 2003, 22:43:27 »
Woah, works perfectly! :o

Big thanks, m8, i think i have been occasionally fiddling around with this for more than half a year!  8)


*crownschrisdeathaskingofconditionfields* ;)