こちらshirogane様が公開されているスクリプトの改変をお願いしたく参りました。
https://qiita.com/shirogane/items/1f2dc5baf8433269ffce
コード: 全て選択
var switchIndex = 1
if(!$gameSwitches.value(switchIndex)){
if(Math.sqrt(Math.pow(this.character(-1)._x - this.character(1)._x,2) + Math.pow(this.character(-1)._y - this.character(1)._y,2))<0.5){
$gameSwitches.setValue(switchIndex,true)
}
}
スイッチではなくそのイベントのセルフスイッチがONにするようにしたいです。
自分で色々試したのですがJavaScript初心者のためお手上げ状態です。
救いの手を差し伸べて頂ければ幸いです。