Arrange python scripts

I have three python scripts in a robot and 2 sensors. How can I arrange them in a certain way such that the robot execute the python script in it first and then the other two consequently
Meaning : the other two scripts do not start unless the robot script is executed once

I think you can try make i property(bool,int,real) which you can include into your python scripts and in the end of your first python script just change the value of that property and check this value in other two scripts

1 Like

And consider using the OnFinalize event for the first script instead of the main level of the script to make sure everything else, including the other two scripts, are loaded in the scene when opening the component/layout. Then like suggested set a property value at the end of the first script and the other scripts can wait for a OnChanged event of that property. That’s one way to do it.
I would assume that naturally the scripts are loaded in top to bottom order in your behavior list, but I wouldn’t trust on that.