Home   Help Search Login Register  

Author Topic: how do i check if an array is not in a vehicle?  (Read 1522 times)

0 Members and 2 Guests are viewing this topic.

tai mai shu

  • Guest
how do i check if an array is not in a vehicle?
« on: 27 Aug 2002, 22:35:49 »
hi im making a script that is activated by a vehicle.

in the script, it checks for the crew, and assigns the crew the variable _Crew

later in the script, it checks if the entire _crew has left the vehicle.

how do i check if the entire _crew array is inside _vehicle????

Demoniac

  • Guest
Re:how do i check if an array is not in a vehicle?
« Reply #1 on: 27 Aug 2002, 23:09:52 »
hi im making a script that is activated by a vehicle.

in the script, it checks for the crew, and assigns the crew the variable _Crew

later in the script, it checks if the entire _crew has left the vehicle.

how do i check if the entire _crew array is inside _vehicle????
@(Driver _Vehicle == (_Crew Select 0) && Commander _Vehicle == (_Crew Select 1) && Gunner _Vehicle == (_Crew Select 2)) or something?

Bremmer

  • Guest
Re:how do i check if an array is not in a vehicle?
« Reply #2 on: 28 Aug 2002, 01:27:42 »
OK, so your group is called _crew, and your vehicle is _vehicle. Lets give your vehicle a global variable for simplicity -> car

If you evaluate the function:

"_x in car" count _crew == 0

it will be true when all the men are not in the car. You cannot use a local variable inside the "", thats why I renamed _vehicle.

Hope that helps.

tai mai shu

  • Guest
Re:how do i check if an array is not in a vehicle?
« Reply #3 on: 28 Aug 2002, 04:01:22 »
ok, cool, thanks a lot m8.