MBot Posted July 12, 2013 Share Posted July 12, 2013 The function Controller.resetTask() does not end a currently assigned mission task. If the mission task is ended by its own stop condition, the respective group will resume the original route as assigned in the mission editor. So ending mission tasks works in principle. Controller.resetTask() works fine to end tasks other than mission tasks. Is the behaviour regarding mission tasks as intended? Link to comment Share on other sites More sharing options...
Grimes Posted July 12, 2013 Share Posted July 12, 2013 What exactly are you trying to accomplish with it? The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
MBot Posted July 12, 2013 Author Share Posted July 12, 2013 I am telling gound vehicles to go somehwere temporary by tasking them a mission. Later I want them to return to their original route and resume it. If you want to know specifically, I am letting tanks find hull-down battle positions in the terrain (which works awesomly well by the way :) ) and want them to continue with their mission editor waypoints later. For now I will work with stop conditions for tasks. I just thought by logic it should work with resetTask and wanted to check if this might be a bug in the scripting engine. Link to comment Share on other sites More sharing options...
Grimes Posted July 12, 2013 Share Posted July 12, 2013 Ah, very cool idea. It could come down to how ground AI is very different from air AI. Air AI are much more capable of complex tasks and you can pretty much get them to go do stuff where-ever you want without having to use a mission task. For ground AI the mission task is all you can use to force them to move from point A to point B. You might be able to use Controller.pushTask() first for when you want them to go hull down and then Controller.popTask() once its finished. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
MBot Posted July 13, 2013 Author Share Posted July 13, 2013 Thanks for the hint Grimes. It turns out that Controller.popTask() will end a currently active mission task while Controller.resetTask() doesn't. According to the wiki, popTask should be the same as resetTask if only one task is in the queue. So this seems to be a small bug with resetTask. For now I will continue to work with popTask then, since I am not building task queues anyway it should make a difference. Link to comment Share on other sites More sharing options...
Recommended Posts