Jump to content
Sign in to follow this  
bracer

Check if SOM missions is completed?

Recommended Posts

Hi all!

I'm trying to figure out how to make a script check if the player completes a SecOps mission generated by the SOM module.

All help is very much appreciated!

/Bracer

---------- Post added at 06:59 AM ---------- Previous post was at 06:51 AM ----------

ok, found this:

Quote:

Originally Posted by MechaStalin

Is it possible to have a script or trigger running that once you had completed a certain amount of SOM missions, say 5, it ended the mission?

Yes

The SecOps template (04: Combat) uses this concept. The SOM tracks completed / failed SecOps in an internal variable history (Array: Scalar | completed, Scalar | failed).

So let's say your SOM is myFirstSOM, you can make your trigger check for:

Code:

((myFirstSOM getVariable "history") select 0) == 5

Edited by bracer

Share this post


Link to post
Share on other sites

I tried implementing the above code into my script, but something seems wrong.

waitUntil {((BIS_SOM getVariable "history") select 0) == 1};
hint "You completed 1 task and get some candy";

waitUntil {((BIS_SOM getVariable "history") select 0) == 2};
hint "You completed another task and get some more candy";

When I complete a SOM mission, I get both of the hints!?

How do I make only hint 1 show after first mission is completed and hint 2 after the second mission is complete?

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  

×