Home   Help Search Login Register  

Author Topic: 50% 's destroyed  (Read 670 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
50% 's destroyed
« on: 28 Jan 2004, 21:23:11 »
I got 2 groups of vehicles in a convoy, the second group follows the first group.

I want a trigger goes off when 50% is destroyed

I got this :

[<name of group1>,<name of group2>] exec "blablabla.sqs"

Quote
_grp1 = _this select 0
_grp2 = _this select 1

_All = count units _grp1 + count units _grp2

@(alive _x" count units _grp1 + "alive _x" count units _grp2)< _all /2

Hint "it works"

No it doesn't...  :-\

How can I fix it?


Search or search or search before you ask.

gundernak

  • Guest
Re:50% 's destroyed
« Reply #1 on: 28 Jan 2004, 22:37:46 »
I do not have running ofp now, so I can not test it, but...

1:
there is a missing " after the @ operator!!!

2:
anyway you do not have to work with alive command here.

you should simply count the units of the groups. If any group member dies the headcount will decrease by one...
So use this:
Code: [Select]
bla
bla
bla
@ (count units _grp1) + (count units _grp2) < _all /2

Hint "it works"

3: If you it still does not work, I can imagine you do not have to use 'units' word. Maybe the arguments are made without 'units'...it is not sure