Jump to content
Sign in to follow this  
Antorugby

Task failed after succeded

Recommended Posts

Hello, i've some problem with my last mission.

I need to pick up a team inside an area, if the team get killed the task should be failed but if they are alive, once they leave the area the task should be succeded.

So i used two trigger, one with:

"blufor countSide thislist == 0"

For the succeded task, so when I pick up them and leave the area the task will be completed.

And another one using:

({alive _x} count units alpha) < 1

For the failed task, so if they get killed before i pick them up the task will fail.

It seems to works fine and i succed the task, but the fail trigger will continue to be active, and if the team get killed during the next task I wil get the message with the first task failed, even if I make them join my team, when they join my team I fail the succeded task.

So there is someway to lock a task once done or something else?

Share this post


Link to post
Share on other sites

I think using the switch triggers can do that. Never used them before I am new to this myself but I am pretty sure it can be used to do that.

Share this post


Link to post
Share on other sites

Name the fail trigger and have the succeed trigger delete it in the onAct once you've succeeded.

deleteVehicle nameOfFailTrigger;

Share this post


Link to post
Share on other sites
I think using the switch triggers can do that. Never used them before I am new to this myself but I am pretty sure it can be used to do that.

Wich trigger should be set on switch?

Name the fail trigger and have the succeed trigger delete it in the onAct once you've succeeded.

deleteVehicle nameOfFailTrigger;

It doesn't work, when I succed the task i get "Fail task" immediately.

Share this post


Link to post
Share on other sites

Don't need a switch trigger, that's mostly for releasing HOLD waypoints, not really tasks.

Can you upload the mission to mediafire.com or dropbox or something so we can see what you have so far? Might be easier than generic examples.

Share this post


Link to post
Share on other sites
Don't need a switch trigger, that's mostly for releasing HOLD waypoints, not really tasks.

Can you upload the mission to mediafire.com or dropbox or something so we can see what you have so far? Might be easier than generic examples.

Yeah of course:

https://www.dropbox.com/s/w8hxa5gb8r86cni/prova%2520heli.Stratis.rar

There is a lot of chaos, sorry for that.

The heli should be on in the airport, i moved it there for simplicity, and there are a lot of stuff just there for reminder.

Btw, can you fix even the join squad trigger, the second one near the airport?

It wont count the unit inside the vehicle, so I don't really know how to activate it when i go back with the team.

Share this post


Link to post
Share on other sites

Here's an edited version of your mission with the issues fixed.

Seems if you're using the modules you'll wanna delete the setTaskState ones. So like if the guys died you'd fail as expected, but as soon as you left you'd "succeed" since there were no more blufor there! :)

So I set those to delete the other impossible result. Fixed the join after rescue which now only kicks off if you actually succeeded. I also added some flavor here or there with radio calls and smoke. Let me know if you have any questions about what I did.

Share this post


Link to post
Share on other sites

I think I'm in love with you lol.

You did a great job, love that, thank you so much, I think I'm going to release the mission when it's done and of course i will mention you.

Thank you again man!

Share this post


Link to post
Share on other sites

Two years later, Kylania's tidy solution nailed my identical script n00b problems. I had all my triggers, deleteVehicle (tedious one by one, instead of using _x), etc. and couldn't figure out why deleting the trigger caused my assigned tasks to auto-fail. Deleting the set Task State was the only thing missing.

My script fu is still too low-level to use the other functions, but I'll probably get there sooner rather than later.

 

Thank you!

Share this post


Link to post
Share on other sites

Could we perhaps get an description of how this was done, with what codes were used? 

Looking to solve the same problem, but rather read the info here than to download missions, place files in correct folder, load up the mission in editor and then search through how it was done. 

Would be much appreciated :)

 

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  

×