Home   Help Search Login Register  

Author Topic: !!!NEED HELP!!!  (Read 768 times)

0 Members and 1 Guest are viewing this topic.

Offline D.murphy man

  • Members
  • *
  • I'm a llama!
!!!NEED HELP!!!
« on: 22 Dec 2002, 21:07:40 »
hey all,i despratly need a help!how might i put more then one name in this part of my script?"w1 distance c1 < 2" so instead of that it would be "w1 distance c1,c2,c3,c4,c5..ect < 2"or somthing along thos lines witch will actully work.plz help,i need a answer to this question so i can get my my coop out as soon as possible.itll most properly be completed by tonight if this topic is answerd.thnx for your help

Bremmer

  • Guest
Re:!!!NEED HELP!!!
« Reply #1 on: 22 Dec 2002, 23:12:09 »
Hello

You can do this using an array. eg put all the units you want to check against into an array, eg:

check = [c1,c2,c3....]

Now use the count command like this:

"w1 distance _x < 2" count check > 0

This condition will become true when any of the units you defined in check come closer than 2m to w1.

If you need to know which unit is within 2m that will require a little bit more scripting (probably best done with a loop) - post again if this is what you need.

 :)