if you have the queue placement option as "stack inside queue" and you call placeoffsetx() to find out where a taskexecuter is travelling to and after that you actually create the unload task you will see that the crane is not going to the same location as the first time you call placeoffsetx. If the time between the calls to placeoffsetx is not 0 then it will give you a different location everytime you call it. Test model is attached. Problem lies most likely in the calculateNextLocation function.