Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
lonesoldier

Ending conditions

Recommended Posts

Ok. I'm just about finished my mission, but there is one small prob. The ending condition. I need to know how to make a mission end after ALL objectives are complete. And don't say "just put it as end#1 in the last objectives trigger". I can't do that as this missions objectives can be done in ANY order. Which ever way you want to do the mission. So how would i make a mission end after all the objectives are done?

Thanks in advance. need immediate feedback please.

Share this post


Link to post
Share on other sites

Ok make a trigger with this in its condition field :

mobjective1 == 1 AND mobjective2 == 1 AND mobjective3 == 1

Then put end1 in the type box of the trigger.

In the triggers which detect if the objective is complete put :

mobjective1 = 1

Then in the second trigger :

mobjective1 = 2

etc.

In the onactivation field for each one.

You will also need to make a init.sqs file with :

mobjective1 = 0

mobjective2 = 0

mobjective3 = 0

In it.

If any of that didn't make any sense I will try to help you some more, I am in a rush at the moment so couldn't write too much.

RED

Share this post


Link to post
Share on other sites

Ok thanks man. But which triggers do i put all these commands in? Theres the end trigger, what else triggers will i need, and what do they do?

Share this post


Link to post
Share on other sites

You have the end trigger with :

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">mobjective1 == 1 AND mobjective2 == 1 AND mobjective3 == 1<span id='postcolor'>

In its condition field.

Then you have to have three more triggers(depending on how many objectives you have) These 3 triggers have to be setup to detect if the objective has been completed (I can't offer you help on this, because I don't know your objectives)

In these 3 or more triggers you will have to put in there onactivation field :

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">mobjective1 = 1<span id='postcolor'>

Then in the second trigger :

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">mobjective2 = 1<span id='postcolor'>

Then the last trigger :

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">mobjective3 = 1<span id='postcolor'>

RED

Share this post


Link to post
Share on other sites

Well which trigger uses the init.sqs?

Plus my objectives are:

1. save the first hostage(by killing his captor)

2.clear the house (resistance not present trigger)

3.clear the forest (resistance not present)

4. save hostage 2 (by killing his captor)

Thanks man

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Well which trigger uses the init.sqs?<span id='postcolor'>

Init.sqs is executed before the mission starts, or as the mission starts.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">So how would i make a mission end after all the objectives are done?<span id='postcolor'>

You have a trigger for the first objective. In that trigger's "activation" field, put:

obj1c = true

(or objective_1_completed = true)

and in second trigger's "activation" field:

obj2c = true

And make that for all objective triggers.

Now put a trigger, with "condition":

obj1c && obj2c && obj3c && obj4c

(assuming that you have 4 objectives)

And that trigger has to of type "End #1".

Now when all objectives are completed, the mission ends.

Questions?

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  

×