Jump to content
Bingo-66d21d294c551e45

Making a task activate after all 3 objectives are finished

Recommended Posts

I'm editing a exfil but I can't figure out how to make a task appear after all 3 objectives are finished. I want it to be invisible until after all 3 objectives are finished.

Share this post


Link to post
Share on other sites

Create variables that become true when your objectives are complete:

ObjectiveName1 = true;
ObjectiveName2 = true;
ObjectiveName3 = true;

 Create a Trigger (server only) with Condition:

ObjectiveName1 && ObjectiveName2 && ObjectiveName3

Create task on Activation field of your Trigger:

BIS_fnc_taskCreate

 

(double post)

Edited by RCA3
  • Like 2

Share this post


Link to post
Share on other sites

Place 3 boxes on the map and name the boxes   box1   box2   box3

 

Create a trigger so that when objective1 is complete, box1 is deleted:  In the On Activation field type;    deletevehicle  box1;

Create a trigger so that when objective2 is complete, box2 is deleted:  In the On Activation field type;    deletevehicle  box2;

Create a trigger so that when objective3 is complete, box3 is deleted:  In the On Activation field type;    deletevehicle  box3;

 

Now create a trigger which basically says that when all 3 boxes are deleted the trigger fires: In the Condition cell type:

!(alive box1)  &&  !(alive box2)  &&  !(alive box3)

 

This way you can complete the objectives in any order. When all 3 boxes are deleted, a trigger fires and the next task is revealed.

.

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites
4 hours ago, Joe98 said:

Place 3 boxes on the map and name the boxes   box1   box2   box3

 

Create a trigger so that when objective1 is complete, box1 is deleted:  In the On Activation field type;    deletevehicle  box1;

Create a trigger so that when objective2 is complete, box2 is deleted:  In the On Activation field type;    deletevehicle  box2;

Create a trigger so that when objective3 is complete, box3 is deleted:  In the On Activation field type;    deletevehicle  box3;

 

Now create a trigger which basically says that when all 3 boxes are deleted the trigger fires: In the Condition cell type:

!(alive box1)  &&  !(alive box2)  &&  !(alive box3)

 

This way you can complete the objectives in any order. When all 3 boxes are deleted, a trigger fires and the next task is revealed.

 

36012f2b8b7922abcae4b5856d75a785.gif

  • Haha 4

Share this post


Link to post
Share on other sites
5 hours ago, RCA3 said:

Create variables that become true when your objectives are complete:


ObjectiveName1 = true;
ObjectiveName2 = true;
ObjectiveName3 = true;

 Create a Trigger (server only) with Condition:


ObjectiveName1 && ObjectiveName2 && ObjectiveName3

Create task on Activation field of your Trigger:

BIS_fnc_taskCreate

 

(double post)

 

Why not?  That works... because the trigger condition is safe with undefined variables...

In absolute (and other context):

objectiveName1 && objectiveName2 && objectiveName3

presuppose these variables are already defined somewhere before.

Spoiler

 

For example, since version 1.94 of Arma3, you can't anymore write without error msg:
0 = [] spawn {waitUntil {sleep 1; objectiveName }; hint "blah" };

if objectiveName is not defined already.

 

So, a safer way for condition, if you "create" variables when objectives are completed, should be:

ObjectiveName1 = false;
ObjectiveName2 = false;
ObjectiveName3 = false;
Before any test about they are true or false. (And "before" is not so simple in this case).

Avoiding any initialization order, you could simply check:

!isNil "objectiveName1" && !isNil "objectiveName2"  && !isNil "objectiveName3"

or even:
[1,2,3] findIf {isNil ("objectiveName"+ str _x)} == -1

no matter true or false or else, the aim is to check if these variables are existing.

 

 

 

  • Like 1

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

×