Hi.
I recently added SRD Skill Extender plugin to my project and after organizing spells I noticed I have a spare slot for another command.
I decided I put there "Escape" Command. By default this command is in Party Menu
- Fight
- Escape
And via my plugin I moved it to Actor Window:
- Attack
- Guard
- Item
- Skills
At this point everything is ok. I managed to add command button and this menu looks like I wanted. Wich is:
- Attack
- Guard
- Skills
- Use Item
- Retreat!
... However Command "Retreat!" does not respond at all, maybe except sound "OK" ...
console shows absolutly no error in my code and I completly stuck...
Here is full code so far I managed to make:
Any help would be appreciated. Thanks in advance.
I recently added SRD Skill Extender plugin to my project and after organizing spells I noticed I have a spare slot for another command.
I decided I put there "Escape" Command. By default this command is in Party Menu
- Fight
- Escape
And via my plugin I moved it to Actor Window:
- Attack
- Guard
- Item
- Skills
At this point everything is ok. I managed to add command button and this menu looks like I wanted. Wich is:
- Attack
- Guard
- Skills
- Use Item
- Retreat!
... However Command "Retreat!" does not respond at all, maybe except sound "OK" ...
console shows absolutly no error in my code and I completly stuck...
Here is full code so far I managed to make:
Code:
(function() {
function RunForestRun() {
if (this._actor) {
$gameParty.performEscape();
SoundManager.playEscape();
/*var success = this._preemptive ? true : (Math.random() < this._escapeRatio);*/
var success = true;
if (success) {
this.displayEscapeSuccessMessage();
this._escaped = true;
this.processAbort();
}
return success;
}
};
SceneManager.prototype.commandEscape = function() {
RunForestRun();
};
Window_ActorCommand.prototype.addEscapeCommand = function() {
this.addCommand('Retreat', 'RunForestRun', true);
};
Window_ActorCommand.prototype.addItemCommand = function() {
this.addCommand('Use Item', 'item', true);
};
Window_ActorCommand.prototype.addAttackCommand = function() {
this.addCommand('Attack!', 'attack', true);
};
Window_ActorCommand.prototype.addGuardCommand = function() {
this.addCommand('Defend', 'guard', true);
};
Window_ActorCommand.prototype.makeCommandList = function() {
if (this._actor) {
this.addAttackCommand();
this.addGuardCommand();
this.addItemCommand();
this.addSkillCommands();
this.addEscapeCommand();
}
};
})();
Any help would be appreciated. Thanks in advance.