04-23-2016, 01:15 AM
(04-21-2016, 11:06 PM)Skarin link Wrote:EDIT: I was actually wondering how you can make a task appear AFTER you complete a previous one. For example in my mission you have to destroy a weapons cache then RTB. The task is complete when the weapon cache is destroyed. I mean it's not a big problem, as I can still have the RTB task active from the start but it'd make it a bit more dynamic to have it appear AFTER you complete the final task.
Use FHQ_fnc_ttSetTaskStateAndNext.
Assume you have tasks "assault", "secure" and "RTB". If the players just finished "assault", do this:
["assault", "succeeded", "secure", "RTB"] call FHQ_fnc_ttSetTaskStateAndNext;
It will set assault to succeeded, and chose the first open task from the "secure" and "RTB". So if "secure" is not already done (either succeeded, cancelled or failed", it will make "secure" the currently active task. Otherwise, "RTB" will become the new active task.