JohnKalo 657 Posted May 4, 2020 To create tasks I use a script that goes like this: _myTaskIDs = ["Task01"]; _makeTask1 = [["Task01"],west,["Text","Title","Task01Pos"],getposATL Start,"ASSIGNED",3,true,true,"attack"]; _watchTask1 = [] spawn { waitUntil {sleep 0.5;!alive target01}; ["Task01", "SUCCEEDED",true] spawn BIS_fnc_taskSetState; }; _makeTask1 call BIS_fnc_setTask; Now the problem is that the getposATL Start shows the initial position of object Start. If the object moves the task continues showing the initial position. Due to that in a task I just changed it to objNull but for another mission I need the task position to be updated. So how can I do that please? Share this post Link to post Share on other sites
gc8 970 Posted May 4, 2020 (edited) You should be able to set the task target to the object you wish to follow and the task pos should update Edit: Destination parameter that is , the fourth parameter of BIS_fnc_setTask Edited May 4, 2020 by gc8 Destination 1 1 Share this post Link to post Share on other sites
JohnKalo 657 Posted May 4, 2020 Thanks it is the fourth parameter but I checked here too: https://community.bistudio.com/wiki/BIS_fnc_setTask and still it does not say how to make the task follow the object. With what I have written it does not. In the page example it says [MHQ,false] which is for [object,precision] . I have to guess that precision is some sort of distance in meters between the target and the task icon and if that is the case then it still does not make the task marker to update. I will try with true to see if it works though. Share this post Link to post Share on other sites
gc8 970 Posted May 4, 2020 16 minutes ago, JohnKalo said: Thanks it is the fourth parameter but I checked here too: https://community.bistudio.com/wiki/BIS_fnc_setTask and still it does not say how to make the task follow the object. With what I have written it does not. In the page example it says [MHQ,false] which is for [object,precision] . I have to guess that precision is some sort of distance in meters between the target and the task icon and if that is the case then it still does not make the task marker to update. I will try with true to see if it works though. I simply put there object and it works if I recall correctly. But I put that for child tasks not the parent... 1 1 Share this post Link to post Share on other sites
JohnKalo 657 Posted May 4, 2020 Just tested the new method. If I use getPosATL NameOfObject it does not update the position. By placing [NameOfObject,false] it does! Thanks now only one thing remains. What does the true or false actually do. I do not get what this means exactly: Quote precisePosition: Boolean - use exact position of the target for map marker / HUD indicator instead of the position known to the owner of the task (depending on the knowledge about the target) Share this post Link to post Share on other sites
gc8 970 Posted May 4, 2020 31 minutes ago, JohnKalo said: Just tested the new method. If I use getPosATL NameOfObject it does not update the position. By placing [NameOfObject,false] it does! Thanks now only one thing remains. What does the true or false actually do. I do not get what this means exactly: I believe it means is the task position always 100% correct on the object OR is it some kind of last known position thing 2 Share this post Link to post Share on other sites
JohnKalo 657 Posted May 5, 2020 Well tried it with both and did not see anything different. Although the object was far away from the player it still worked. Share this post Link to post Share on other sites
wogz187 1085 Posted May 6, 2020 @JohnKalo, I'm not quite sure I understand. You want the task marker to stay with the target? This is the simple setup I always use for tasks and they track with the target, Spoiler [true,["task1"],["Mission Objective","Mission","Target"],objNULL,1,3,false] call BIS_fnc_taskCreate; // create task ["task1","assigned"] call BIS_fnc_taskSetState; //assign and hide task ["task1",[target_obj,true]] call BIS_fnc_taskSetDestination; //set task to objective Hope that helps. Have fun! 3 1 Share this post Link to post Share on other sites
JohnKalo 657 Posted May 7, 2020 @wogz187 The issue was that the task did not follow the moving chopper. Due to the GetPosATL NameOfObject command. I changed it to [NameOfObject,false] and it worked. Before making the campaign I used models which work with moving targets so I never had an issue. Now however that I use scripts the above happened. In your code though [target_obj,true] why true and not false? What does that section do please? Share this post Link to post Share on other sites
wogz187 1085 Posted May 7, 2020 @JohnKalo, As per the wiki, Quote [ Object, true ]: Task will be on exact object position, even if player doesn't know about the object I set it false when the task is hidden at objNull. I don't actually know if that is necessary. Have fun! 1 Share this post Link to post Share on other sites