Jump to content
Sign in to follow this  
Beny.cz

A tank without enemy crew...

Recommended Posts

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

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

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 by Beny.cz

Share this post


Link to post
Share on other sites

I suggest to put

({alive _x} count crew tank1) == 0

into the condition.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×