Execution order: Difference between revisions

From Fancade Wiki
(Create page. Mostly a rewrite and a merge of an existing article from wiki.)
 
m (Text replacement - "Category:Scripts" to "Category:Scripting")
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


# A script with their {{Port|e|Before}} port ''not'' plugged in will be executed each frame.
# A script with their {{Port|e|Before}} port ''not'' plugged in will be executed each frame.
#* A few built-in scripts will need to have it plugged to run, such as [[Play Sound]] or [[Win]].
#* [[Play Sound]], [[Stop Sound]], [[Win]], and [[Lose]] will not run unless their {{Port|e|Before}} port is plugged.
# Sorted individually under their originating block, with built-in scripts always the bottom-left block, script executes in priority:
# Sorted individually under their originating block, with built-in scripts always the bottom-left block, script executes in priority:
## Y-axis, from up to down.
## Y-axis, from up to down.
Line 21: Line 21:
:''TBA''
:''TBA''


[[Category:Scripts]]
[[Category:Scripting]]

Latest revision as of 07:09, 16 June 2024

The execution order is the sequential order in which scripts run. It is determined by the following rules:

  1. A script with their Before port not plugged in will be executed each frame.
  2. Sorted individually under their originating block, with built-in scripts always the bottom-left block, script executes in priority:
    1. Y-axis, from up to down.
    2. X-axis, from left to right.
    3. Z-axis, from top to bottom.
    4. If on a script block, the scripts inside it.
  3. Upon their execution, certain scripts will execute their wires according to their usage, e.g. If.
  4. A script with their After port plugged in will execute the script connecting to it. Comparisons to a flowchart can be drawn.

Common problems

On Play

TBA

Create Object

TBA