Ugh. This is what i hate most. They all start at the same time but when i have two or more complicated scripts working at the same time one dosnt work. sadface.
Offline
They start in an arbitrary order that is not guaranteed to be the same each time, so if you need one thing to happen before another, you must put in some explicit synchronization.
The two most common forms of synchronization are putting in waits and using broadcasts.
For example, if script A must finish before B starts and B finish before C starts you could do.
when greenflag clicked
...body of A....
when greenflag clicked
wait 0.1 seconds
...body of B...
when greenflag clicked
wait 0.2 seconds
....body of C....
You'd have to adjust the times to make sure that everything in A is done before B starts and everything in B is done before C starts.
It is a little easier to use broadcasts:
when greenflag clicked
...stuff in A that must come before B...
broadcast start B
...rest of A....
when I receive start B
...stuff in B that must come before C...
broadcast start C
...rest of B...
when I receive start C
...body of script C...
Offline