OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: tai mai shu 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????
-
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?
-
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.
-
ok, cool, thanks a lot m8.