Jump to content
Sign in to follow this  
mihikle

not alive (triggers)

Recommended Posts

Hi guys

Making a mission where there is a small convoy of 4 vehicles (truck1, truck2, truck3 and truck4) that move along a track and the players have to ambush them somewhere along that track. At a nearby airfield there will be a Quick Reaction Force that will respond if the convoy is ambushed. The players then have to run back to a forward operating base and defend it until a Chinook arrives to pick them up.

What I basically need is some type of code I can put in a trigger which basically says (below code) in the 'condition' section.

if either truck1, truck2, truck3 or truck4 notAlive;

I'm pretty much a noob at scripting so the above is probably unlikely or is written entirely differently. So would this work or am I barking up the wrong tree entirely? Or would I have to make four separate triggers (one for each truck) and sync them to the same waypoint?

Cheers,

Michael

Share this post


Link to post
Share on other sites
{not alive _x} count [truck1,truck2,truck3,truck4] > 0

Edited by ProfTournesol

Share this post


Link to post
Share on other sites

Put it in the condition field:

(!alive truck1) OR (!alive truck2) OR (!alive truck3) OR (!alive truck4)

Share this post


Link to post
Share on other sites

Well the second reply looked easier to understand so I used that and it worked perfectly. Thank you very much radeck1983!

Share this post


Link to post
Share on other sites
Well the second reply looked easier to understand so I used that and it worked perfectly. Thank you very much radeck1983!

Yes but the first reply is just as good & when you'll be checking alot of objects, is where you'll want to use it for sure.

Edited by Iceman77

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  

×