tips 0022 variables - cwtickle/danoniplus-docs GitHub Wiki

English | Japanese

<- Back to Tips Index

Convenience Variable Groups

  • This section summarizes a set of variables that are useful for handling custom JS.

Length

  • In Dancing☆Onigiri (CW Edition), various key types appear.
  • It is often better not to use a fixed value when specifying the position, especially since the horizontal length changes depending on the key type.
Variables Values
g_sWidth Width of screen
g_sHeight Height of screen
g_btnX(dx) Distance from the left edge of the screen when the width of the screen exceeds 900px and an object with a width of 900px is centered. The argument can specify the adjustment width in px. The argument defaults to zero.
g_btnWidth(multi) The width of the screen (up to 900px). The argument can be a percentage, 1/2 will be half of the screen width. The argument defaults to 1.
g_headerObj.playingWidth Width when playing(chart setting: effective when playingWidth is specified)
g_headerObj.playingX X-axis correction value at play(chart setting: effective when playingX is specified)
g_headerObj.playingHeight Height when playing(chart setting: effective when playingHeight is specified)
g_headerObj.playingY Y-axis correction value at play(chart setting: effective when playingY is specified)
g_headerObj.scAreaWidth Width of shortcut area if shortcut key is different from normal(chart setting: effective when scArea is specified)

Time Lapse

Variables Values
g_scoreObj.baseFrame Number of elapsed frames. This number is not affected by Adjustment.

Chart information

  • "scoreId" is a chart number.
Variables Values
g_detailObj.toolDif[scoreId] Difficulty of the chart
g_detailObj.playingFrameWithBlank[scoreId] Playing time
g_detailObj.playingFrame[scoreId] Playing time (except until the first arrow appears)

Judgment range

Variables Values
g_judgObj.arrow Judgment range of arrows
g_judgObj.frz Judgment range of freeze arrows

Related pages