as below picture，there are two Transporter A and B, A and B move or backwards , I have a problem ,for example the A will move to its destination,so I need to confirm whether the B is on the way to A destination. if it is true the A can not through, in this case ,i need can do two ways,one is I move B per the method,or waituntil B finish its task and move forward, so how can realize this ,thank you
In a method, you can wait until B has stopped moving, then check its rear postion on the track. If its rear position will block A, then B needs to move again.
Something like this:
waituntil B.stopped prio 1
if B.RearPos <= A._DestinationPos
B.stopped := false
Here, _DestinationPos is an user-defined attribute of A which defines A's front position at its destination.