Jump to content
Sign in to follow this  
Yeti1

Task to task if one before is completed.

Recommended Posts

Hi all, I have been browsing various posts but I can't get this to work at all.

I have a set of tasks across the map and I want them to trigger in order so I tried to use this in my condition box for the trigger that starts Task6b..

taskState tskTask5b == "SUCCEEDED";

This does not work and the next task wont start, I need it to only work when task5b has been completed.

Task5b has this in the init..

tskTask5b setTaskState "SUCCEEDED";
tskTask6b = Player createSimpleTask["Task6b"]; 
tskTask6b setSimpleTaskDescription["Check this area.", "Check Here", "Move"];
tskTask6b setSimpleTaskDestination (getMarkerPos "M1task6b");
Player setCurrentTask tskTask6b;

What am I doing wrong ?

Share this post


Link to post
Share on other sites

Triggers don't need the ; end. Also I'd put the whole thing in brackets.

((taskState tskTask5b) == "Succeeded")

As for the rest of it, I can't piece together what it's supposed to do.

Why do you set task 5 to succeeded immediately? - Since you say it's an init field.

Edited by Weirdo10o4

Share this post


Link to post
Share on other sites
Triggers don't need the ; end. Also I'd put the whole thing in brackets.

((taskState tskTask5b) == "Succeeded")

As for the rest of it, I can't piece together what it's supposed to do.

Why do you set task 5 to succeeded immediately?

I want the trigger to check if task5b has been completed before activating task6b.

I do this so the trigger doesn't activate if the player goes across it before doing task5b, task5b was the last task then it starts task6b.

Edit: I tried putting that line in the condition box but it still wont start the next task.

Lets say it's task1 and I only want task2 to start when task1 is complete, what would I put in the condition box of the trigger to check task1 has been completed ?

Edited by Yeti1

Share this post


Link to post
Share on other sites

Also: when I tried copying what you did and created a radio trigger with the following on activation:

hint (taskState tskTask5b)

It returns "Assigned". Check whether this is the case with your mission?

Share this post


Link to post
Share on other sites

The next task is assigned as it pops a hint ... (sorry missed last line on my Original Post)

tskTask5b setTaskState "SUCCEEDED";
tskTask6b = Player createSimpleTask["Task6b"]; 
tskTask6b setSimpleTaskDescription["Check this area.", "Check Here", "Move"];
tskTask6b setSimpleTaskDestination (getMarkerPos "M1task6b");
Player setCurrentTask tskTask6b;
Hint "Take Lee to the Airfield"

The Hint comes up and it even puts a cursor on the hud of the location to move to.

I just need to know what to put in the condition box so it will only work if the last task is complete.

---------- Post added at 13:44 ---------- Previous post was at 13:21 ----------

Aww what a doofus I am, when I was testing it I started before it initiated task5 so it could never be completed, it works perfect with that line you gave me thanks.

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  

×