Jump to content
Sign in to follow this  
Normal Norm

How to End a a task

Recommended Posts

Hi Guys, I am hoping this is a simple question.  I am creating a mission and one of the objectives to this mission is to rescue a hostage (ive named h1) held by OpFor. I have managed to assign the mission ok (intel-create task) and have set up a trigger which enables the hostage to join players group when entered.  What I would really like is to end the objective when the hostage (h1) hits a certain place.  I am going to have my men drop the hostage at a particular place back in base in order for it to complete.  So how do i end the objective.  I have tried creating a succeeded intel task which I have linked to a trigger with "(h1 in thisList); " in the condition field and synced to the succeeded task module but this doesnt work :(

 

Any help would be greatly appreciated.

 

 

Share this post


Link to post
Share on other sites

What are the other settings on your trigger?  Depending on the side they might be to be ANYBODY PRESENT or something similar.

Share this post


Link to post
Share on other sites

The trigger in which i want to end the task ( with (h1 in thisList); in the condition field) is set to bluefor present

Share this post


Link to post
Share on other sites

And is the hostage BLUFOR?  If he's still setCaptive he'll be considered Civilian.

Share this post


Link to post
Share on other sites

Yes he is bluefor.  on the trigger i have set up for him to join group I have put [H1] join ASSASSIN; h1 setcaptive false;  h1 enableAI "move";  which enables the hostage to join our group and we can command him to enter a vehicle which will take him to the desired location

Share this post


Link to post
Share on other sites

That's odd, sounds like you have it all setup correctly.  Don't suppose you could upload the mission somewhere so we could take a look if something else was incorrect?

 

Also, the Condition field of the trigger reads this exactly?

h1 in thisList
  • Like 1

Share this post


Link to post
Share on other sites

I am able to upload it if you'd be so kind, it is a work in progress and it is set up for the sneaky peak branch which im guessing you will need to access it?

 

edit: yes I have (h1 in thisList);  in the condition field of the trigger where it should complete the task 

Share this post


Link to post
Share on other sites

Yeah, but that's OK.  I have Dev Branch loaded and some issues we might be able to see/fix without even loading the mission. :)

Share this post


Link to post
Share on other sites

So the problem are your task modules.

 

Change the hosres1 createTask module to start as Created instead of Succeeded.  Also unsynch it from the end trigger.

Then create a new setTaskState module and place it somewhere on the map.  Synch that to your end trigger and the hosres1 createTask module.

 

Doing that will make it work as expected.

 

Actually, oddly the way it was originally is working, sometimes...  but changing to use the setTaskState module is working every time. :)

Share this post


Link to post
Share on other sites

Thanks for your input I will attempt to try it now.  Though I am a little confused as I have 2 task modules, 1 which is assigned to the player-assigned, the other hosres1 is the succeeded one.  So ill have 1 module assigned and 1 module created?

Share this post


Link to post
Share on other sites

Oh, you can delete one of them, they are redundant.  Here's a really quick demo of how you can set it up.

 

The Create Task module (set to Assigned) can be anywhere.  Synched with a Set Task Destination module (where the hostage will be) and two Set Task State module (set to Succeeded and Failed).  

 

Four triggers will control the logic.  One to make the hostage join your group (or you can use addAction).  One to detect if the hostage is back home.  That will activate the Succeeded module and the delayed cleanup trigger to delete the hostage.  The final trigger is to test if the hostage is dead but the rescue trigger hasn't gone off.  That will fail the task.

 

uBNIg2k.jpg

  • Like 3

Share this post


Link to post
Share on other sites

You sir are a bloody Genius and deserves a medal lol.  Problem sorted thank you very very much

Share this post


Link to post
Share on other sites

You sir are a bloody Genius and deserves a medal lol.  Problem sorted thank you very very much

Yep he is!

I just finished up a hostage rescue mission which pretty much solely consisted of stuff taught to me by Kylania and some of the other amazing folks from here.

I should put them in the credits. :) I think they did more of the heavy lifting than I did!

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  

×