Home   Help Search Login Register  

Author Topic: who was it  (Read 686 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
who was it
« on: 26 Sep 2005, 21:25:59 »
if you set up a trigger east detected by west and run a script through it is there away of finding out who detcted the east units ? if so how
thanks

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:who was it
« Reply #1 on: 26 Sep 2005, 23:14:27 »
I don't think there is a way via triggers only. You could execute a script that runs through all units on the opposing side and detect if they know about the east unit though.

TRIGGER:
Code: [Select]
Activ: Any Group Member
Detected By West

onActiv: [list westUnitsTrigger] exec "findUnit.sqs"

and just run a script checking for each member of a "West" or "East" array if they detected the man.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:who was it
« Reply #2 on: 27 Sep 2005, 01:34:50 »
actually i believe you could find out who saw them with 2 triggers:
nvm, 2 triggers and a script...

trigger 1:
west detected by east
on activation:found=true;found_units=thislist; and anything else you want

trigger 2:
covering whole map
east present (probably repeatedly, depends on the situation)
condition:this and found
on activation:  thislist exec "whoknows.sqs"

Code: [Select]
_found = found_units
_east_units = this
_finders = []
{?_x knowsabout ({_x} foreach _found) > 2:_finders = _finders + _x} foreach _east_units
hint format ["%1 have found the west units",_finders]

i believe 2 is the correct knowsabout value (more or less) for whether a unit has been identified. this isn't garunteed, especially since that coupling of foreach might be a bit touchy....

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:who was it
« Reply #3 on: 27 Sep 2005, 03:14:40 »
mm, heard 1.1 or 1.5.

But i'll go check.  :P
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:who was it
« Reply #4 on: 27 Sep 2005, 03:17:09 »
Eh, I was wrong. :o

Quote
With Resistance (1.91):
No matter what class of unit the target is and no matter what the skill/class of the enemy AI, the magic 'knowsabout' number is 0.105.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:who was it
« Reply #5 on: 27 Sep 2005, 04:03:00 »
well i was way off  :P ::) :-\
oh well...

Offline 456820

  • Contributing Member
  • **
Re:who was it
« Reply #6 on: 28 Sep 2005, 13:10:40 »
thanks alot ive found a way wich i oulled out of some other script its a bit slow but it works
thanks

topic solved