Home   Help Search Login Register  

Author Topic: Grabbing loons in cargo  (Read 431 times)

0 Members and 2 Guests are viewing this topic.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Grabbing loons in cargo
« on: 15 Sep 2004, 19:53:54 »
I have a Bradley.   In the back there are some loons who are not in the same group as the Bradley.     I also have a trigger:  when fired the trigger does all kinds of evil things.

However, "thislist" does not grab the loons in the back.  (In fact it doesn't even grab the vehicle crew, although I can get round that by twisting the arm of the one loon it does grab until he tells me who else is in his group.)

So I'm stuck.   How can I get a trigger to capture the loons in cargo?

Many thanks.


Whatwhatwhatwhatwhat?  Yes I know there's only one possible group on the map to which this applies, and yes I can solve the problem by dealing with that group explicitly in the script called by the trigger.   But it's the principle of the thing, d'you see?
Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Grabbing loons in cargo
« Reply #1 on: 15 Sep 2004, 20:29:01 »
Code: [Select]
private["_com","_gnr","_drv","_cargo"];
_com = commander _this;
_gnr = gunner _this;
_drv = driver _this;

_cargo = (crew _this) - [_com,_gnr,_drv];

_cargo

usage:
vehicleName call loadFile "funcName.sqf"
This (function) should return the cargo...

Or, you could just use
cargo = crew vehicleName - [commander vehicleName,gunner vehicleName,driver vehicleName]

No guarantees whatsoever... :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Grabbing loons in cargo
« Reply #2 on: 15 Sep 2004, 20:48:24 »
Brilliant, that's just what I needed.     Thanks.
Plenty of reviewed ArmA missions for you to play

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Grabbing loons in cargo
« Reply #3 on: 16 Sep 2004, 01:45:57 »
Yikes! A whole function for that? Why not just:

Quote
_cargo = (crew bradley) - [ bradleyd, bradleyc, bradleyg ]

Does the same thing I guess... ;)