mathias_eichinger 64 Posted January 9, 2017 (edited) Hi community, since the search function brought me nowhere with this, I need to ask: How can I hide objectives until an event happens in the middle of a mission that triggers the appearance of a second objective? Pre-EDEN, you just had to sync a Trigger to a Module containing setTaskState "Created" and then it appeared (if I recall correctly). As of EDEN, the CreateTask Module has to be synched to the player unit in order to be visible: If this is done, it is visible beforehand, regardless of trigger condition, and vice versa. Does anybody know how to do it? EDIT: Download for the mission below http://www.filedropper.com/the20mousetrapchernarus Needs CUP Terrains, CUP Weapons and CUP units though! Edited January 11, 2017 by mathias_eichinger Download link added. Share this post Link to post Share on other sites
johnnyboy 3803 Posted January 9, 2017 Hi Mathias, good to see and old OFPEC comrade! I recommend creating all tasks via scripts. Especially if you ever need to re-order them. To re-order them in the editor, you have unlink them all, then re-link them all in proper order. I've heard some people say that doesn't work any more also, so you may have to drop them all, and then re-link them all to playable units. How I approached this for Property of Mabunga mission, is to put initial task creation in one .sqf file, and the optional/dynamic task in another .sqf file. In the init.sqf, I compile the scripts, and then call the first one to add initial tasks to player. Then a snippet is spawned that waits for a condition to be true before adding another task. This would be your "hidden" task. This example is MP compliant. // Compile task creation scripts addTaskEveryWhere = compileFinal "_handle = execVM ""Scripts\addTask.sqf"";"; addTaskExfilWest2 = compileFinal "_handle = execVM ""Scripts\addTaskExfilWest2.sqf"";"; // Call to create initial set of tasks for players [[], "addTaskEverywhere" ] call BIS_fnc_MP; // Background spawned script to another task conditionally when CHOPPERS_DOWN_WEST is true [] spawn { if (!isServer) exitwith {}; sleep 30; waituntil {sleep 2; (CHOPPERS_DOWN_WEST) }; sleep 10; [[], "addTaskExfilWest2" ] call BIS_fnc_MP; }; This is the addTask.sqf to define initial tasks.: task0 = ["Task0", east, ["Locate and Rescue VIP.", "Rescue VIP.","Rescue"], objnull, "CREATED", 4, false, true] call BIS_fnc_setTask; task1 = ["Task1", east, ["Kill Admiral Mabunga.", "Kill Admiral Mabunga.","Clear"], objnull, "CREATED", 1, false, true] call BIS_fnc_setTask; task2 = ["Task2", east, ["Destroy fuel truck.", "Destroy pirate fuel truck.","Destroy Fuel"], objnull, "CREATED", 1, false, true] call BIS_fnc_setTask; task3 = ["Task3", east, ["Destroy ammo cache.", "Destroy ammo cache.","Destroy Ammo"], objnull, "CREATED", 1, false, true] call BIS_fnc_setTask; task4 = ["Task4", east, ["RV for Extraction.", "RV for Extraction.","RV Extract"], objnull, "CREATED", 4, false, true] call BIS_fnc_setTask; This is the addTaskExfilWest2.sqf that adds the extra task.: task05 = ["Task06", west, ["Exfil by land", "Exfil by land","Move to Exfil by land"], getMarkerPos "mrkWestExfilComplete", "CREATED", 4, true, true] call BIS_fnc_setTask; Share this post Link to post Share on other sites
Larrow 2828 Posted January 10, 2017 (edited) Quote As of EDEN, the CreateTask Module has to be synched to the player unit in order to be visible: If this is done, it is visible beforehand, regardless of trigger condition, and vice versa Just sync the trigger to the createTask module instead of a setTaskState. The task will not show in task list or 3d until the trigger has been activated. Once activated it will take on the state as set in the createTask module. @johnnyboy Check you code in addTask.sqf I think something has gone wrong when you pasted, there are erroneous lines ending in BIS_fnc_setTask that have no beginnings. Unless my browsers acting up. Edited January 10, 2017 by Larrow Share this post Link to post Share on other sites
johnnyboy 3803 Posted January 10, 2017 2 hours ago, Larrow said: Just sync the trigger to the createTask module instead of a setTaskState. The task will not show in task list or 3d until the trigger has been activated. Once activated it will take on the state as set in the createTask module. @johnnyboy Check you code in addTask.sqf I think something has gone wrong when you pasted, there are erroneous lines ending in BIS_fnc_setTask that have no beginnings. Unless my browsers acting up. @Larrow Thanks, I cleaned up the code example (don't know what happened there). But what about re-ordering tasks, Larrow? Isn't it a huge pain in the ass if you use the editor and have multiple tasks? Share this post Link to post Share on other sites
Larrow 2828 Posted January 10, 2017 Ordering task via modules is a PITA and could do with something similar to waypoints or make them get ordered by taskID for those activated at mission start. You would think its the order you place them in the editor and hence the order they get read out of the sqm but this is not always true or maybe for synced tasks the order of the connection in the sqm but again not always true. Its likely the order they get pulled from the prioritise queue in the module initialisation. After a few experiments you can change their queue position by putting this... this setvariable ["bis_fnc_initModules_priroty", 10] In each createTask modules init box, increasing it for each task you want created next. I would start with something like 10 just to make sure they do not mess with other modules that actually need prioritisation. Only put it through a few tests but seemed to order tasks correctly. Again this is only for tasks created at mission start. As described in the OP one task following the next, the ordering is not going to matter. 1 Share this post Link to post Share on other sites
mathias_eichinger 64 Posted January 10, 2017 Wow, thank you guys for your replies, I am still testing and did not try all your solutions. I should elaborate a bit about the mission setup: The first objective is to kill a target person, upon getting close to that person, a trigger fires that displays a hint about a map just found on the body. This trigger also successfully changes setmarkertype of the location marker of objective 2 from empty to destroy. Please note that linking that trigger to CreateTask module of objective 2 does not create the second task, as Larrow suggested. I also synched the second CreateTask module to a radio trigger for testing purposes, to no further avail. Since this synchronisation orgy drives me nuts, I will most likely hope for Johnnyboy's scripted solution. Hopefully this works, because I am close to give up on the EDEN editor for good.... Share this post Link to post Share on other sites
Larrow 2828 Posted January 10, 2017 Please note that linking that trigger to CreateTask module of objective 2 does not create the second task, as Larrow suggested Works fine for me. Share this post Link to post Share on other sites
csk222 23 Posted January 10, 2017 Can you share an example mission to inspect what you have going on/ set up. Share this post Link to post Share on other sites
mathias_eichinger 64 Posted January 11, 2017 If you have CUP units, CUP Weapons and CUP terrains, you can check out what is going on - I provided a download link in the first post. I would be very grateful! Share this post Link to post Share on other sites
csk222 23 Posted January 11, 2017 https://www.dropbox.com/s/lasxqsrzk6a3pq5/The_Mousetrap_CSK222.Chernarus.zip?dl=0 I just made it work to what you specified. I wouldn't sync the objectives to just one player, I'd make them available to all playable units without the "sync to" connections/lines. I did see that you had other units with their very own diaries so I figured you have something bigger planned so I left it how you had it with the syncs. Hope that helped in some way. Good Luck! Share this post Link to post Share on other sites
mathias_eichinger 64 Posted January 15, 2017 Thank you csk22, this brought me one step closer to dive back into mission editing (and releasing) again! I'll keep this topic bookmarked though - johnnyboy's approach also looks like a good idea. Share this post Link to post Share on other sites