Script Guide_5 make your scenario with several files
It will be a nightmare to write all the content in a single file when the story is long, split it into episodes in other files.
[call] - jump to another file
The script [call]
goes with one or two parameters, the
scenario file and the label you want to go to. You can use many files and jump
between them in a game. Use this script
to read another scenario file.
[goto Filename| Labelname]
Filename:
the filename of the scenario, all the file can be found in the scenario directory.
Labelname:
the name a label in current scenario file. You can use variables in Labelname.
It will read the first line without this parameter.
Example: read a new file
[call anotherfile.txt]
This will lead the
game to another file and read the first line of script.
[call anotherfile.txt|somelabel]
This will read the
other file and jump to the line of that label.
[return] - go back to the last file
when you use [call]
to jump to another scenario file, you can use the script [return] to go back to
the last file and start at the next line of [call]. you can use it only once after a [call] in this version.
the last file will
store in the savefile after a script [call] runs correctly if you saved. So the
[return] is usable after you load a savefile.
Example: jump and go back
In the mainfile.txt
[dialog bunny| hello! I am bunny.]
[call anotherfile.txt]
[dialog bunny| It is me again!]
In the anotherfile.txt
[dialog cabbage| Hi, I am a cabbage.]
[return]
The bunny says hello
and a cabbage come to say hi, and then the game goes back to the first scenario
file, shows the bunny again.
0 条评论:
发表评论
订阅 博文评论 [Atom]
<< 主页