Fandom

Touhou Wiki

Touhou Danmakufu: Miscellaneous

7,297pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.


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.


Also on Fandom

Random Wiki