Touhou Wiki

Touhou Danmakufu: Character Script Functions

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

Functions for character scripts.

Character Control Functions

Functions to control user-defined characters.


Set the x-coordinate of the player's character.

1 Parameter
    1) x-coordinate


Set the y-coordinate of the player's character.

1 Parameter
    1) y-coordinate


Set the speed of the character.

2 Parameters
    1) speed on normal move
    2) speed on slow move


Set the collision detection. When the circle is attacked, one life is lost.

3 Parameters
    1) x-coordinate (commonly GetPlayerX)
    2) y-coordinate (commonly GetPlayerY)
    3) radius (commonly about 1)


Set the frames to accept the counter-bomb. The frames is automatically shortened 3 frames per counter-bombing. The frames is returned to the value indicated here after miss.

1 Parameter
    1) frames


Set number of the initial bombs. After miss, the number of bombs is returned to the number.

1 Parameter
    1) initial bombs

Shot Control Functions

Functions to control the character's shot. The complex bullets are created by using object bullets.


Load the bullet definition script for character's shot.

1 Parameter
    1) path of the  bullet definition script (string)


Fire a bullet.

7 Parameters
    1) x-coordinate
    2) y-coordinate
    3) velocity
    4) angle
    5) power (damage per frame)
    6) penetration (attackable times by vanishment)
    7) graphic (user-defined only)

The Other Functions


Set the image of the player's lives.

5 Parameters
    1) path of the graphic
    2) left
    3) top
    4) right
    5) bottom


Show cut-in for using the spell card.

3 Parameters
    1) type of cut-in
    2) spell card name
    3) path of the cut-in image


Use the spell card.

2 Parameters
    1) spell card name (string)
    2) user-defined argument


Set the y-coordinate of the lower bound to collect the items automatically.

1 Parameter
    1) y-coordinate (default is 160)


Get whether on counter-bombing or not.

Return value
    true : on counter-bombing
    false: not on counter-bombing

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.

Also on Fandom

Random Wiki