ページ 1 / 1
【解決】コマンド入力中の前進について
Posted: 2018年4月04日(水) 21:05
by 9のdan
戦闘が始まった時に「戦う」「逃げる」というコマンドが出てきますが、
「戦う」を入力した際の
「攻撃」、「魔法」、「防御」、「アイテム」を選択中の時、
アクターが一歩前に出る動作をカット(待機中と同じ動作)するにはどうすればよいのでしょうか。お力添えをお願いします。
Re: コマンド入力中の前進について
Posted: 2018年4月04日(水) 23:02
by しぐれん
この関数で前進処理をしています。
これの中身を空っぽにするか、1行目にreturn を入れればOKです。
コード: 全て選択
Sprite_Actor.prototype.updateTargetPosition = function() {
if (this._actor.isInputting() || this._actor.isActing()) {
this.stepForward();
} else if (this._actor.canMove() && BattleManager.isEscaped()) {
this.retreat();
} else if (!this.inHomePosition()) {
this.stepBack();
}
};
Re: コマンド入力中の前進について
Posted: 2018年4月05日(木) 02:10
by 9のdan
コマンド入力中に動かなくなりました、ありがとうございます!
実は、Victor Sant 様の VE_BattleMotions(
https://victorenginescripts.wordpress.c ... e-motions/)
というプラグインを併用しており、これをONにした場合に挙動が元に戻ってしまうようです。
プラグインの3756行~3820行に似たような項目を見つけたのですが
「アクターのコマンド入力中は前進しない」に加え、
「行動(攻撃など)をするときには自由に移動出来るように」するにはどうすれば良いでしょうか。
力不足でこのように追加するような形を取ってしまい申し訳ないです…。
Re: コマンド入力中の前進について
Posted: 2018年4月05日(木) 03:25
by しぐれん
isInputting()で判定をとっている場所を探して、そこを消してみてください。
コード: 全て選択
//VE_BattleMotions.js
Sprite_Battler.prototype.updateTargetPosition = function() {
var battler = this._battler;
if (battler.isMoveRequested()) {
var move = battler.moveMotion();
this.startMove(move.x, move.y, move.duration || 1);
battler.clearMoveMotion();
} else if (battler.isInputting() && !battler.inputStep()) {
battler.requestActionMontion({
name: 'inputing',
push: true
});
battler.inputStepForward();
} else if (battler.inputStep() && !battler.isInputting()) {
battler.requestActionMontion({
name: 'inputed',
push: true
});
battler.inputStepBackward();
}
};
Re: コマンド入力中の前進について
Posted: 2018年4月05日(木) 09:45
by 9のdan
ありがとうございます。無事に動くようになりました!
分かりやすく教えていただき感謝です!