Home   Help Search Login Register  

Author Topic: i need a trigger condition please...  (Read 3284 times)

0 Members and 1 Guest are viewing this topic.

Offline filth

  • Members
  • *
  • Who's the bad man?
Re: i need a trigger condition please...
« Reply #15 on: 22 Jun 2007, 00:59:15 »
ok. that explains things brilliantly, thanks. i presume that the trigger still fires if all the units from one of the groups is dead? only, i tried deleting the alpha grouping on the player in your mission, let bravo wander into the trigger and the trigger didn't fire. but if i add another unit, group him as alpha, remove the alpha grouping on the player and kill the alpha unit before bravo enters the trigger zone, it does fire. so i presume that as long as there are two groups defined on the map to begin with as alpha and bravo, it will work, even if one group is dead. is this true?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: i need a trigger condition please...
« Reply #16 on: 22 Jun 2007, 01:11:52 »
indeed. the trigger needs something to go on. if no group is defined as group A and you're testing for both group A and group B, ofp will say "huh? i only see group B. whatchatalkinbout?"

or something to that effect...

glad to have helped.  :good:

Offline filth

  • Members
  • *
  • Who's the bad man?
Re: i need a trigger condition please...
« Reply #17 on: 22 Jun 2007, 01:42:07 »
 :D terrific. understood. thanks m8.  :good:

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: i need a trigger condition please...
« Reply #18 on: 26 Jun 2007, 04:25:11 »
Thanks for the lesson Bedges.  :clap:

Offline filth

  • Members
  • *
  • Who's the bad man?
Re: i need a trigger condition please...
« Reply #19 on: 27 Jun 2007, 01:33:40 »
ok, i didn't want to start a new thread, because this question is related to the answer to this one. here's the situation:

i'm using a modified condition line from this topic to execute a new trigger which i want to fire when members of alpha and bravo group's numbers are down to 2.

the condition line is as follows: ({_x in thislist} count units alpha) + ({_x in thislist} count units bravo) < 3

this works perfectly as long as the group members are not inside a vehicle. the trouble is, there's a really good chance that they will be inside a vehicle when this trigger condition is met. and i have no idea which vehicle, as it's a multiplayer mission. so i can't use the condition lines in the thread i found in a search, started by surpher, as i won't know the name of the specific vehicles.

how can i modify the count unit condition to make sure the units are counted whether they're inside a vehicle or not? (and it needs to apply for any vehicle on the map)

i've been reading some other threads on counting units inside vehicles, and outside vehicles, but i can't seem to see a solution to counting the units in groups whether they're inside or outside at the same time.

is there a way of doing this using this:

_all = [r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16]
#loop
westalive = 0
"if (alive _x) then {westalive = walive + 1}" foreach _all;
? westalive == 0 : goto "westdead"
~5
goto "loop"
#westdead
~2
[] exec "alldead.sqs"
exit

this is a script i found for checking that members of the multiplayer environment are alive throughout the game and fires an end scene if everyone dies. is there a way to modify this maybe so that it fires when there are only 2 members left?

fingers crossed...

« Last Edit: 27 Jun 2007, 01:50:56 by filth_merchant 101 »