| 想了想那样做太麻烦了,我看了眼Yanfly的那个插件发现还是很容易加上shaz那个寻路的。 你先启用YEP_EventChasePlayer.js和shaz的SmartPath.js,并把下面的代码保存到一个新js文件里放在以上两个插件【下面】启用。
 之后不用按照shaz那个设定插件指令了,只要按照Yanfly那个在移动路线里设置一下所需的属性(_chaseRange,_chaseSpeed之类的),就可以同时实现视野判定和智能寻路了。
 
 
 
 Game_Event.prototype.updateChaseMovement = function() {        if (this._stopCount > 0 && this._chasePlayer) {                this.setTarget($gamePlayer);        } else if (this._stopCount > 0 && this._fleePlayer) {                this.moveAwayFromPlayer();        } else {                this.clearTarget();                Yanfly.ECP.Game_Event_updateSelfMovement.call(this);        }};
Game_Event.prototype.updateChaseMovement = function() { 
        if (this._stopCount > 0 && this._chasePlayer) { 
                this.setTarget($gamePlayer); 
        } else if (this._stopCount > 0 && this._fleePlayer) { 
                this.moveAwayFromPlayer(); 
        } else { 
                this.clearTarget(); 
                Yanfly.ECP.Game_Event_updateSelfMovement.call(this); 
        } 
}; 
 临时改的,不知道会不会出什么奇怪的现象,你先试试
 |