|
|
|
Directory: Technical >> Script Lib >> Introduction >> Compilation.
When I say that scripts do not work; I will mean that nothing will be executed.
Konoko will be in her
default position and the only thing which can happen will be controlled internally be *.sep files.
In scripts, there is a function called main. It is usually found in the files like airport_main.bsl.
It looks something like this:
func void main (void)
{
[body]
if (savepoint eq) 0
{
intro
}
level_start
}
Compilation may end after only two lines: 'win' or 'lose'. Win makes you win the level and
lose makes you lose the level.
The main function is executed automatically as soon as the level begins. The intro function is usually happens in the
cutscene while the func_start in the level logic file. They call some functions and these functions call other functions.
We get a hierarchry of functions from the main function.
But the point is that not all functions belong to this hierarchry.
This functions are called independant functions and they too may have their hierarcharies.
They are controlled by the *.sep files and are executed when you enter
a certain region like an acid pool or a death fall or when you use a console.
This functions may easily be identified if they are not called by their main function or any of its descendants. These
functions may not be deleted or your scripts won't work since the *.sep files wouldn't find them.
Oni scripting permits cyclic or self-reference functions. Make sure that the cyclic functions are forked or end at some point
so that the main line of the code could run.
|
|
|