Jump to content
Sign in to follow this  
rtek

Mission End after all Tasks Complete and Return to Base

Recommended Posts

5 tasks. Once 4 main tasks complete, the 5th task is to return to base(land back where I originally took off). Need the mission to end when all 4 main tasks are complete and player arrives back at base completing the 5th task of returning to base.

how do I setup the final end mission trigger? I've tried putting tskX = true; in each task completion trigger and in the End #1 trigger I put tsk1 and tsk2 and tsk3 and tsk4 and tsk5 in the condition. What am I missing?

tsk1 = true;

tsk2 = true;

tsk3 = true;

tsk4 = true;

tsk5 = true;

in each task complete trigger ON ACT.

Share this post


Link to post
Share on other sites

This should actually work if it's setup the way you describe it.

Made a small mission to double check: Click

Did you check for spelling and if each single tsk1-5 trigger actually activates/activated by set to anybody?

Share this post


Link to post
Share on other sites

Ill test out your mission later when im home. Yeah I double checked all spelling and all the triggers fire. Ill need to tripple check later.

Share this post


Link to post
Share on other sites

it works, but I need the final trigger to only activate when the other triggers have because the player will walk into the trigger at the very beginning of the mission when he gets into his helicopter to take off. I need that trigger to only fire when he returns from the mission and lands inside that trigger, which that trigger will complete the final objective of returning to base. If the trigger fires in the beginning when he returns to base, then the mission will finish right after he completes his last task on the field before going to the extraction since that one trigger back at base fired when he first boarded the heli. If that makes sense.

Would it just simply a matter of setting the final location trigger to Repeatedly instead of Once since the player will be walking through it twice but it needs to fire when the task to return to base is active? Nevermind, that doesnt work. Since that trigger already fired, soon as the 5th Task is available it's considered completed because of going into that trigger in the beginning.

Edited by RTEK

Share this post


Link to post
Share on other sites

I'm not sure if it makes the difference, but do you have to define your variables and setting initial state before using them?

Like, put this to init.sqf (or if you don't want to scipt it, just put this to some static objects, like invisible helipads, init field)

tsk1 = false; tsk2 = false; tsk3 = false; tsk4 = false; tsk5 = false;

Does it make difference?

Share this post


Link to post
Share on other sites

I just tried it and it doesnt help. 5th task completes before the player even reaches the trigger zone of the 5th task location.

The way I'm testing now is I am simply using the one that GrumpyOldMan linked, but I added task and task completion modules all synced. I put a blufor soldier inside the 5th trigger to simulate the player moving through it in the beginning of the mission. I run with the playable character from the start to the finish and the mission ends before I can even get to the 5th trigger since that trigger already fired at the beginning of the mission. I even put in a condition of tsk1 and tsk2 and tsk3 and tsk4 in that trigger, thinking it will only fire once those 4 tasks are complete, but apparently it fires off regardless.

edit:

i changed the 5th trigger condition to be

tsk1_ok and tsk2_ok and tsk3_ok and tsk4_ok

and 5th trigger doesn't fire at all now, beginning or end. I think using tskx_ok might be on the right track as it prevented the trigger from firing in the beginning.....

---------- Post added at 00:37 ---------- Previous post was at 23:38 ----------

Task test Mission This is what the test is setup like right now. Player starts inside the 5th trigger, runs to the 1st zone, moves through the structure passing 2nd, 3rd then 4th and exiting back at the 5th zone. I need that 5th zone/trigger to complete the mission even though the player started there.

I just went ahead and made the final trigger a radio trigger so player has to radio HQ that they've successfully made it back to base.

Edited by RTEK

Share this post


Link to post
Share on other sites

I know this is an old thread but the issue intrigued me.

As mentioned before you do have to define your public variable but that can be done in the same trigger, so in each trigger on activation use this code (changing it to tsk2, tsk3 etc.)

tsk1 = true; publicVariable "tsk1"; hint "tsk1 = true"

then in the final task condition use this code

player in thislist and tsk1 and tsk2 and tsk3 and tsk4

and in on activation

tsk5 = true; publicVariable "tsk5"; hint "tsk5 = true"

Then your mission end trigger can remain as it was. It all seems to work now, how I think you wanted it.

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  

×