Beny.cz 10 Posted September 28, 2009 Hi, There is a task to destroy two convoyes in a mission me and my friend created. We used " not (alive tank1) && not (alive tank2), ..." as a condition in a trigger which sets the task as succeded. It works fine. But yesterday we managed to decrew one tank and use it to take out the rest of the convoy. But we had to destroy it to make the condition true. So, is there a way how to find out wheater a vehicle has a ENEMY crew, and if it has not, set the condition to true ? Thanks, Beny Share this post Link to post Share on other sites
rübe 118 Posted September 28, 2009 sure. I'd suggest you write a little function, which does all the checks and returns either true or false (to be easily used/called in your trigger).. A call to (crew tank) return the units in question, check each ones side (side _x) and there you go... Another idea would be to store your convoys in a global array. Then your trigger would check the status of all vehicles in this array to fire your trigger. The trick would then be to just delete any tank from this array, once you (or anyone else from your team/side) enters such a vehicle... Share this post Link to post Share on other sites
Deadfast 43 Posted September 28, 2009 count (crew tank1) == 0 - returns true when the tank is empty :) Share this post Link to post Share on other sites
Beny.cz 10 Posted September 28, 2009 (edited) I can not get it working Deadfast. But I found out that if the vehicle name is tank, than the driver's name is tankd, gunner's name tankg and commander's name is tankc. EDIT: Oh, my bad, it works. But it does not work if the crew died in the vehicle. Edited September 28, 2009 by Beny.cz Share this post Link to post Share on other sites
Bon 12 Posted September 28, 2009 I suggest to put ({alive _x} count crew tank1) == 0 into the condition. Share this post Link to post Share on other sites