1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ティラノストーリーで会話に変数を組み込む

Posted at

結論

ティラノスクリプト.js
[eval exp = " f.tmp = '文字列' + f.name + '文字列' "]
[chat_talk pos="left" name="名前" text="&f.tmp" face="chara.png" ]
[p]

使用例

image.png

ティラノスクリプト.js
[eval exp = " f.tmp = 'ありがとう。' + f.name + '君って優しいんだね!' "]
[chat_talk pos="left" name="名前" text="&f.tmp" face="chara/otaku_girl_fashion.png" ]
[p]

手順

プロジェクト→変数管理から変数nametmpを作成。
image.png
コンポーネント→スクリプト→ティラノスクリプトを選択して記入。
image.png

参考

[chat_talk]タグについての使い方は以下を参照した。

引用画像

余談

[chat_task]タグのtextに直接変数名を含んだ文字列を描こうとして失敗したので、
一度別の変数tmpに文字列+変数を代入し、
変数tmpを[chat_talk]タグで表示させるという方法を取りました。
ティラノビルダーでティラノストーリーのプラグインを用いているけれど、
最初に入力させたプレイヤーの名前を含んだ会話を表示させたいときに用いてください。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?