Since the product comes in from the To Conveyor Process, you should probably use OnTransition event instead. It’s inherited from class vcContainer.
Based on the OnPhysicalTransition event’s description, it triggers at product’s leading edge, which does not hit the path’s start in this layout.
Hello,
That’s related to Python’s “garbage collection”, i.e. deallocating memory for objects that are no longer needed. Now that variable “path” is declared only locally inside OnRun, the object as well as its event handler are cleaned out when the OnRun ends.
Mostly component scripts have the event handler assigned in the global scope (when the script is compiled by user, or component is loaded to 3D world). However, if there’s a need to set the event handler inside some scope, you can do this to “keep the event handler alive”: