So the critical flags allow that thread to have the main execution meaning no other thread can prevent that thread from executing. If there is not enough physical time to execute all threads this one gets priority.
Looks like you are using some of the new functions in the e-series where you can move in a direction until something happens like touching a surface. So the function is calculating the waypoint to move to. You will find other script functions that are not listed in the manual. These are generally functions that UR has not exposed to the URScript community but as you’ve found they are always discoverable but you would have to do the work to understand what the arguments mean.
Also, always make sure you are using the script manual that corresponds to the Polyscope version because as they introduce new stuff in Polyscope sometimes they update the manual to match and give an API reference.
Whild I was looking into the Direction, I found this:
Also, why the enter_critical and exit_critical are matter?
Thank you for answers