0::/""# --------ver 1.1-------- 0::/""# ----------------------------------------各投稿者で編集(ここから)---------------------------------------- 0::/""# 動画の色調に合わせて見やすい色を設定してください。 0::/COMMENT_COLOR=0xc2972a; 0::/""# 標準のコメントを置換処理により非表示にする(""#を削除すると動作します。) 0::/""#replace(dest:" ", fill:true) 0::/""# 下記を削除すると視聴者が特殊コメントを非表示にする方法がなくなります。 0::/""# 下記の例では動画の上部にボタンを表示していますが、下部に表示するにはueをshitaに書き換えます。 0::/""# また動画の色調に合わせて見やすい色を設定してください。 0:ue yellow @1000:@ボタン 「[入|切]」 × 非表示 small 1000 0::/""# ----------------------------------------各投稿者で編集(ここまで)---------------------------------------- 0::/""# ※※※※※※※※※※※※※※※※※※ここから下は編集しないでください。※※※※※※※※※※※※※※※※※※ 0::/""# --------変数-------- 0::/isSpecialComment = true; 0::/""# 最後にコメントされた再生秒数 0::/lastCommentVPos = 0; 0::/""# テキスト配列 0::/txtArray=[]; 0::/16.times(\txtArray[@0]=dt(text:" ", x:-10, y:384, z:1, size:60, color:COMMENT_COLOR, pos:'ue hidari', mover:'',filter:'')); 0::/""# テキスト配列用カウンタ 0::/count=-1; 0::/""# --------関数-------- 0::/""# テキスト配列からテキストを取得します。 0::/def_kari("newText", txtArray[(++count)%txtArray.size]); 0::/""# 指定された文字が半角か否かを取得します。 0::/def_kari("isHankaku", if((' ' <= $1 && $1 <= '~') || ('a' <= $1 && $1 <= 'z'), then:true, else:false) ); 0::/""# 指定された文字列に含まれる半角文字の数を取得します。 0::/def_kari("getHankakuNum", result := 0; i := 0; while_kari(i < $1.size, if(isHankaku($1.index(i)), then:result++; ) ; i++; ); result); 0::/""# テキストの上移動処理を開始します。 0::/def(startUpText(), txt := newText(); initUpText(txt); i := 1; while_kari(i <= 110, timer(timer:0.05 * i, then: upText(txt); ); i++;) ); 0::/""# テキストを初期化します。 0::/def(initUpText(txt), txt.text = chat.message; initTextX(txt); txt.y = 384; txt.z=2; txt.size = 40; txt.alpha=0;); 0::/def(initTextX(txt), hankakuNum := getHankakuNum(chat.message); zenkakuNum := chat.message.size - hankakuNum; txt.startx = 256 - 17 * zenkakuNum - 10 * hankakuNum; txt.x = txt.startx;); 0::/""# テキストを上に移動させます。 0::/def(upText(txt), txt.y -= 4; upTextX(txt); (32 > txt.size).alt(txt.size -= 0.2, txt.size -= 0.15); (txt.alpha > 30).alt(txt.alpha += 3, txt.alpha += 0.5);); 0::/def(upTextX(txt), if(txt.startx >= 256 - 17 * 4, then:txt.x += 0.2, else:if(txt.startx >= 256 - 17 * 8, then:txt.x += 0.4, else: if(txt.startx >= 256 - 17 * 12, then:txt.x += 0.6, else:txt.x += 0.8 )))); 0::/""# --------メイン処理-------- 0::/""# 何かコメントされた時の処理を定義 0::/commentTrigger(if(chat.fromButton == false && (((chat.vpos-lastCommentVPos)>0.17) || chat.isYourPost==true), then: if(isSpecialComment, then:lastCommentVPos=chat.vpos; startUpText();))) 0::/commentTrigger(if(chat.isYourPost==true && chat.fromButton && "×"==chat.message.index(0), then: if(isSpecialComment, then:isSpecialComment = false;, else:isSpecialComment = true;)));