Home   Help Search Login Register  

Author Topic: Who set off the trigger?  (Read 687 times)

0 Members and 1 Guest are viewing this topic.

Pravit

  • Guest
Who set off the trigger?
« on: 18 Jul 2005, 00:04:53 »
In a trigger activated by "East", "West", etc. is it possible for me to get the unit that set off the trigger for use in my scripts?

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:Who set off the trigger?
« Reply #1 on: 18 Jul 2005, 00:49:36 »
what you mean?? maybe tring whit "thislist"?
sorry i dont get the idea...

Offline Blanco

  • Former Staff
  • ****
Re:Who set off the trigger?
« Reply #2 on: 18 Jul 2005, 01:33:10 »
Probably with thislist select 0...

Can't test it, I've lost my OFP CWC CD  :-[
I still have my Resistance CD, but... whaaaaaaaaa
Search or search or search before you ask.

Pravit

  • Guest
Re:Who set off the trigger?
« Reply #3 on: 18 Jul 2005, 06:14:27 »
Let's say I have an east group, esoldiers, and several west soldiers. One of the west soldiers walks into a trigger that is activated by "West present." When this trigger is activated, I would like to do something like this:

esoldiers reveal (guy who set off the trigger)

How would I do this?

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Who set off the trigger?
« Reply #4 on: 18 Jul 2005, 06:37:03 »
Try
eastgroup1 reveal (thislist select 0)
in the 'on activation' field of the 'west present' trigger, where eastgroup1 is a named group of east soldiers.
(use eastgroup1 = group this) in leader's init field to name a group)
Not all is lost.

Pravit

  • Guest
Re:Who set off the trigger?
« Reply #5 on: 18 Jul 2005, 07:05:47 »
Thanks, Artak! Now I have another question - it seems "thislist select 0" would select the first element of some kind of list(I imagine the units that have set off the trigger). What if this trigger was set to go off repeatedly, and I wanted to reveal every single guy who came through? Would "select 0" still work or would I have to increment the number?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Who set off the trigger?
« Reply #6 on: 18 Jul 2005, 07:14:55 »
Code: [Select]
{watchers_group reveal _x} foreach units thislist
that should work.

qqqqqq

  • Guest
Re:Who set off the trigger?
« Reply #7 on: 18 Jul 2005, 13:11:50 »
thislist is just an array.    Read up on arrays to get the best out of it.

Pravit

  • Guest
Re:Who set off the trigger?
« Reply #8 on: 18 Jul 2005, 19:11:39 »
Great, thanks!