i have created a sensor based track where object a,b,c are to be delivered to line l1 l2 & l3
when transporter has 2 objects a or b it only unloads only one at time.
I would like to modify method so that it unloads all object, because it unload one object at time
thank you for the help
Solved! Go to Solution.
What you want is to loop through all of the parts on the transporter and check there names, from this you can then know the right ones to move. The easiest way to do this is as follows.
for var i := @.NumMU downto 1 if @.MU(i).name="a" then @.MU(i).move(l1) end next
Now when you put this into your code, you will see that only 1 MU goes down each line still dispite we wanted all of the MU's of that name to go instead, this is as when we move a MU to the line then it will block the end so the next MU cannot go that way anymore.
There is a few ways to solve this issue depending on what you want, one is to make the transporter stop until it has unloaded all of the MU's, introducing a time delay between the unloading of each MU to give the previous one time to go down the line to free up the end.
Another way is to insert the second MU futher down the line into a posistion that is not blocked, so the transporter does not need to stop moving at all.