/**Custom Code-JV-Change_transport_TS_offset_travel*/ Object current = ownerobject(c); treenode ts = param(1); if(gettotalnroftasks(ts)>4){ // Transport tasksequence // ---- standard transport tasksequence // 1.travel to loadstation // 2.load item at loadstation // 3.break -> look for other tasks when capacity left // 4.travel to unloadstation // 5.unload item at unloadstation // ---- treenode unloadstation = gettaskinvolved(ts,5,2);// 2nd involved reference of 5th task = unloadstation treenode item = gettaskinvolved(ts,5,1);// 1st involved reference of 5th task = item inserttask(ts,TASKTYPE_TRAVELRELATIVE,NULL,NULL,0,-0.5,0,0);// go away from table setrank(last(ts),3);// insert between 2nd and 3rd task of standard transport tasksequence inserttask(ts,TASKTYPE_PLACEOFFSET,item,unloadstation,1,0,0,1); // go parallel to the second table setrank(last(ts),5);// insert previous to the unload task // --- changed transport tasksequence // 1.travel to loadstation // 2.load item at loadstation // 3.travel relative offset from table // 4.break -> look for other tasks when capacity left // 5.travel to unloadstation // 6.travel offset only in x-direction // 7.travel the left y-, z-direction and unload item at unloadstation // ---- } else{ // Utilize Tasksequence inserttask(ts,TASKTYPE_SETNODENUM,spatialrz(current),NULL,90);// force rotation without animation setrank(last(ts),3);// previous to the utilize task }