stayfrosty24 10 Posted July 28, 2015 Hello guys, I'm trying to create a task where the player must enter a vehicle. The only problem is to update the task marker position. I want to do this by script and not in the editor. See the code below, i think there is a simple solution for this problem someting like a while loop but i can't seem to figure this one out! Any help would be much appreciated. I have a MRAP called B_MRAP_1 and it's driving to a location where the player must get in. But when i call the task the marker is placed on the location where the MRAP is driving on that time and it does not update. missionTasks.sqf case "task1" : { if (_taskState == "") then { [ player, _taskID, [ "Get in the MRAP", "Get in", "GET IN" ], [color="#FF0000"][b]getPos B_MRAP_1[/b][/color], true ] call BIS_fnc_taskCreate; }; }; Kind regards, StayFrosty24 Share this post Link to post Share on other sites
Icaruk 14 Posted August 2, 2015 Have you tried setSimpleTaskTarget? [ player, task01, ["Get in the MRAP", "Get in", "GET IN"], getPos B_MRAP_1, true ] call BIS_fnc_taskCreate; task01 setSimpleTaskTarget [B_MRAP_1, true]; If it doesn't attach to your target, you can try: 0 spawn { // use this if you are not using execVM or spawn while {true} do { task01 setSimpleTaskTarget [B_MRAP_1, true]; sleep 1; }; }; Share this post Link to post Share on other sites
stayfrosty24 10 Posted August 3, 2015 Icaruk, Thanks for your reply, i tested it but it didn't work. Have you tried it yourself? Can you let me know if it worked. Regards, StayFrosty24 Share this post Link to post Share on other sites
Icaruk 14 Posted August 4, 2015 Icaruk, Thanks for your reply, i tested it but it didn't work. Have you tried it yourself? Can you let me know if it worked. Regards, StayFrosty24 I have no time to test it for myself, sorry. I think that setSimpleTaskTarget is just for simple tasks (lol). You can try to create a simple task instead BIS_fnc_taskCreate. Share this post Link to post Share on other sites
stayfrosty24 10 Posted August 4, 2015 I have no time to test it for myself, sorry. I think that setSimpleTaskTarget is just for simple tasks (lol). You can try to create a simple task instead BIS_fnc_taskCreate. Icaruk, Fair enough, i will give it a try. Thanks for the help. Share this post Link to post Share on other sites
Master85 1 Posted August 5, 2015 Try to enter the object itself (and not its position) as destination for BIS_fnc_taskCreate. If I remember correctly BIS_fnc_taskCreate is using - depending on the type of the destination argument - setSimpleTaskTarget (object) or setSimpleTaskDestination (position) internally. i.e. [ player, _taskID, [ "Get in the MRAP", "Get in", "GET IN" ], B_MRAP_1, true ] call BIS_fnc_taskCreate; Share this post Link to post Share on other sites
stayfrosty24 10 Posted August 5, 2015 Try to enter the object itself (and not its position) as destination for BIS_fnc_taskCreate. If I remember correctly BIS_fnc_taskCreate is using - depending on the type of the destination argument - setSimpleTaskTarget (object) or setSimpleTaskDestination (position) internally. i.e. [ player, _taskID, [ "Get in the MRAP", "Get in", "GET IN" ], B_MRAP_1, true ] call BIS_fnc_taskCreate; Master85, Thank you very much! That did the trick. Regards, StayFrosty24 Share this post Link to post Share on other sites