Jump to content
Sign in to follow this  
Griffy

How to end the mission when a single unit dies.

Recommended Posts

In the trigger field, you can select for example when east is not present to end the map. However i cant find a way to do it for single units.

I have 2 pilots that i want the mission to end when they die.

If anyone can help me with this id appreciate it , as its the last thing i need to do before ive finished my mission biggrin_o.gif

Share this post


Link to post
Share on other sites

Many possibilites. Name the pilots and let a script check if they are still alive, set a global variable else that triggers end of mission. Or do something like:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

pilot1 addEventHandler ["killed",p1_dead=true; publicvariable p1_dead]

pilot2 addEventHandler ["killed",p2_dead=true; publicvariable p2_dead]

And make an endmission trigger that triggers when "p1_dead AND p2_dead"...

Share this post


Link to post
Share on other sites

And also you can group the trigger to the pilot(s). Then you get them in the dropdown list just like East. (I think it's unit, or any group member).

And dozens of other ways. biggrin_o.gif

Share this post


Link to post
Share on other sites

That's easy. Name your units, e.g. p1 and p2. Then create a trigger and in the, on activation field type NOT (alive P1) AND NOT (alive p2), and there you go. wink_o.gif

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  

×