Quicky: does calling a script run asynchronously? [SOLVED]

Just wondering as I've hit a bump in the road, the title says it all actually. Will a block of code "wait" for a script to finish or does it continue asynchronously?

Does it go:

1)
CODE
CODE
SCRIPT START
SCRIPT CONT
SCRIPT END
CODE
CODE

or:

2)
CODE
CODE
SCRIPT START
CODE + SCRIPT CONT
CODE + SCRIPT END

Am I making sense?

Edit:

By "script start" I mean y'know script_execute(scriptName);
 
It uses run order number 1. You can check this yourself by stepping through an event with a script somewhere in the code. The event code will run normally up until it hits the script then it will step through the script code, then revert back to the original event code and execute the rest of it. It HAS to do this because a script can return a result after it has finished and it's possible that the game will need that result in order to make sense of the rest of the event code (for instance, if the script returns a true or false and is in an if statement; how would the computer know whether that if was true or not if the script ran AFTER the entire event had completed?).
 
It uses run order number 1. You can check this yourself by stepping through an event with a script somewhere in the code. The event code will run normally up until it hits the script then it will step through the script code, then revert back to the original event code and execute the rest of it. It HAS to do this because a script can return a result after it has finished and it's possible that the game will need that result in order to make sense of the rest of the event code (for instance, if the script returns a true or false and is in an if statement; how would the computer know whether that if was true or not if the script ran AFTER the entire event had completed?).
Thank you kindly.
 

DukeSoft

Member
look at the code as a folder structure - it just opens the first thing it sees, everytime.

SCRIPT A:
do thing B
call SCRIPT C
do thing E

SCRIPT B:
do thing D

compiler will run A, B, C, D, E
 
Top