Sign In To Proceed c4w4p

Don't have an ? 1z382s

osu! to create your own !
wiki
This page contains an outdated translation of the original content. Please check the English version for the most accurate information (and consider updating the translation if you are able to help out)!

Storyboard Variables 2w1j3m

変数 の機能を使うことで、osbファイル内で文字列、列などの置き換えをすることができます。これはゲーム中では変更することはできないため、ソフトウェアの開発者のような人向けの機能です。また*osuファイルはこれをサポートしていません。 61k3b

使用法 474k29

osb上部で[Variables]のセクションを作成し、そこで変数に関しての宣言を行います。

[Variables]
$color_link=0,255,0
$sample_path="Sample.png"

上記のように$を含んだ名前を左側に、=を挟んで右側に実際に置き換えたいコードを入力します。そして実際に置き換えたい場所で、($名前)の部分を置くことで置き換えが行われます。

Sprite,,Centre,$sample_path,320,240
_C,0,58810,59810,$color_link

これは以下のように見ることができます。

Sprite,,Centre,"Sample.png",320,240
_C,0,58810,59810,0,CC,0

注意点 1c3s71

注意点としてEditorで保存をした時、その時存在していた全ての変数は上書きされます。なので以下のように短すぎたり、よく使われるような用途で使うことは避けるべきです。

[Variables]
$number_of_loops=12

[Events]
// ...

Sprite,,Centre,"Sample.png",320,240
_C,0,6000,7000,12,12,12