Home   Help Search Login Register  

Author Topic: group1 in vehicle?  (Read 937 times)

0 Members and 1 Guest are viewing this topic.

Azraell

  • Guest
group1 in vehicle?
« on: 05 Dec 2002, 21:19:48 »
hey!  :D  i know how to check if a certain unit is in a vehicle....but how can i check to see if my whole group or whats remaining of my group is in a helo....  " in " always wants objects, not groups. some units of the group may be dead when evac gets there, so it cant be specific units that it checks, just any that have survived and got in the chopper, then when whoever is alive made it aboard, it proceeds.



thanks! :)

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:group1 in vehicle?
« Reply #1 on: 05 Dec 2002, 21:33:22 »
In the condition field of your waypoint or trigger, whichever you are using, put the following code:

"_x in vehicle" count units group1 == west countSide units group1

Replace vehicle with the name of your vehicle.  Also, I assumed that this is for the West side.  If not, change west to the appropriate side.
Ranger

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:group1 in vehicle?
« Reply #2 on: 05 Dec 2002, 22:13:25 »
Or just use:

"_x in vehicle" count (units group1) == count (units group1)

count (units group) always returns the actual number of units
from given group, no need for West countside here.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:group1 in vehicle?
« Reply #3 on: 05 Dec 2002, 23:03:12 »
Actually Chris, countside will return only living units, while count will return living units plus any dead units which the leader does not know are dead.

So when you hear the:

"Oh no... 2... is down"

That's the sound of count updating ;) Before that happens, you still have the same amount of units in your group, even though 2 is actually dead.

Countside will update as soon as 2 dies... I tend to use countside whenever possible as count may delay (or even halt) scripts due to it's need to have the leader know about dead units....

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:group1 in vehicle?
« Reply #4 on: 06 Dec 2002, 01:18:50 »
Ranger, sorry for wrong altering of your suggestion then  :-[

SUI,

thanks for that info - this brings light into a problem, i've
got in one of my missions.

I had a 9 men group, starting in chutes, while the leader's
chute doesn't open. The idea was, that objective 1 will become active, once the leader isn't anymore a member
of the group (search for dead leader, and get the mission
briefing).
 I've been using: leadername not ín group,
and it didn't work, when trying that on a dedicated server.
On a normal client-server, all worked fine, as long as the host
player right clicked onto the dead leader, but on the dedicated
server, even after all players been right clicking the dead leader, nothing happened.

So i had to change the whole thingy in: leader down, objective
1 appears.

Maybe the use of countside might help here aswell then.
I'm gonna try that tomorrow.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Azraell

  • Guest
Re:group1 in vehicle?
« Reply #5 on: 06 Dec 2002, 14:18:48 »
cool, thanks Ranger, Chris and Sui....didnt think of _x, i had been trying foreach and i thought _x could only be used with foreach, :-[ :-\ more or less. ill just add that to my snippets text file ranger ;D, ill call this thread solved if ye dont mind :D

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:group1 in vehicle?
« Reply #6 on: 06 Dec 2002, 19:13:16 »
Ranger, sorry for wrong altering of your suggestion then  :-[

Not a problem, CD.  I believed the same thing at one time, until Sui also corrected me.  8)

Quote
I've been using: leadername not ín group,
and it didn't work, when trying that on a dedicated server.
On a normal client-server, all worked fine, as long as the host
player right clicked onto the dead leader, but on the dedicated
server, even after all players been right clicking the dead leader, nothing happened.

Why not do a simple, not alive leadername?  Why even count units in the group?

Edit: Sorry, forgot to address the original, poster.  ;D  No problem at all, Azraell.  Good luck with your mission!  Feel free to mark this thread as answered.
« Last Edit: 06 Dec 2002, 19:16:34 by Ranger »
Ranger