Touhou Wiki
Advertisement

Comments[]

/*
      comment
 */

The text between /* and */ is ignored.

// one-line comment

The text between // and new-line is ignored, too. The feature is called comment.

Comments are often used to put some description. Comments are used to invalidate some codes temporarily, too.

    CreateShot01(GetX, GetY, 5, GetAngleToPlayer, RED01, 0);

              ↓

//    CreateShot01(GetX, GetY, 5, GetAngleToPlayer, RED01, 0);

The invalidation is called comment out.


File Inclusion[]

The contents of a file can be included into the other file with #include_script and #include_function directives.


Script Inclusion[]

#include_script includes scripts.


script.h.txt

script_enemy_main { ... }

script.txt

...

#include_script ".\script.h.txt"

In this case, script.txt is equivalent to the following:

...

script_enemy_main { ... }


Function Inclusion[]

#include_function includes codes into the script.


script.h.txt

    function wait(n) { ... }

script.txt

...

script_enemy_main {
    ...

#include_function ".\script.h.txt"
}

In this case, script.txt is equivalent to the following:

...

script_enemy_main {
    ...

    function wait(n) { ... }
}

#include_function can include subroutines and variable definitions, too.


Advertisement