Importing Files
How to include other scripts in your script
Last updated
Was this helpful?
How to include other scripts in your script
Last updated
Was this helpful?
At the beginning of a , you can import a .BF
, .FLOW
.BMD
or .MSG
file.
Chaining together multiple .FLOW
scripts is a great way to keep your code clean and organized.
You can call by name from pre-compiled .BF
files and other .FLOW
files, and by name (or index) from pre-compiled .BMD
files.
Suppose the file we are creating is named Experiment.flow, and we want to use a from another (Test.flow).
Suppose we have the following files...
(our new .FLOW
)
(The .FLOW
we're importing)
(The .MSG
imported by the .FLOW
we're importing)
[dlg FirstMessage] [s]Message 1.[e]
[msg SecondMessage] [s]Nessage 2.[e]
[dlg ThirdMessage] [s]Message 3.[e]
The Importing section of this guide is still incomplete. Pending additional information on the following:
Importing Compiled Scripts
With .BF and .BMD you can reference procedures, variables and messages by name, but variable names and comments are lost. You can still decompile these to see the message names/indexes and procedure names in order to reference them.
If run in-game, the in Test.bf's embedded .BMD
"Message 3." would be shown in a message window.
This is because the integer inShowWindow()
is initialized with a value of 2, and then used as the first parameter (required input) in theMSG()
function.
indexes start at 0
, so it'd actually show the 3rd .
Now that you understand pretty much every element of a , we can move on to getting user input with , which is a great place to begin making your own scripts.