Skip to content

Variable

katsumasa edited this page Apr 21, 2021 · 2 revisions

変数

イベントスクリプト内では変数を利用することが出来ます。

使用出来る変数の型の一覧

概要
int 整数型
float 実数型
string 文字列型

宣言方法

int a
float b
string c

リテラル

宣言時に値を代入する場合、変数名の後にスペースを入れて値を記述します。

int a 100
float b 12.34
string c "Hello"

代入方法

イベントスクリプト中に、変数には値もしくは値を代入することが出来ます。 文字列はダブルクォーテーションで括り付けて使用してください。

set a 1234
set b 5.678
set c "World"

int d 5678
float e 9.0
string f "Boo"

set a d
set b d
set c f

予約語

いくつかの変数はSystem側でプリセット済みです。 これらの変数はイベント関数実行時の引数で使用することを想定しています。

int型のプリセット値

変数名 プリセット値
fingerId -4

string型のプリセット値

変数名 プリセット値
begin "begin"
move "move"
ended "ended"
down "down"
up "up"
jump "jump"
fire1 "Fire1"
fire2 "Fire2"
fire3 "Fire3"
submit StandaloneInputModuleOverrideで設定されているsubmitButtonの値
cancel StandaloneInputModuleOverrideで設定されているcancelButtonの値
horizontal StandaloneInputModuleOverrideで設定されているhorizontalAxisの値
vertical StandaloneInputModuleOverrideで設定されているverticalAxisの値
frame "frame"
sec "sec"
sceneChanged "sceneChanged"

Clone this wiki locally