I need to modify a plugin, i'm not a developer my javascript knowledge is very basic.
This plugin is from a Japanese guy, there's no documentation, anyway, everything works correctly.
It's a sort of platform/adventure plugin, it works but the character doesn't change graphic when do actions, so, jumping, dashing, etc etc it's really bad without custom graphic.
I have two ways to do that, one is with parallel process, and conditional branch but i cant identify wich string put in the "script" something like
Game_Player.prototype.dash()Doesn't work
Or o think (is way better) add a prefix and say to change filename when jump, for example
if Dash use filename hero_dash.png instead hero.png
There's a part in the code where there's a sound effect for the action i think down below is the best place to put (change filename etc etc)
Code here:
// ボタン入力によるダッシュ処理Game_Player.prototype.dashByInput = function() { if (this._dashDelay > 0) { this._dashDelay--; } else { if (Input.isTriggered('dash') && !this.isSwimming()) { if (!$gameMap.isDashDisabled()) { if (this._ladder) { this.getOffLadder() if (Input.isPressed('left')) { this.setDirection(4); } else if (Input.isPressed('right')) { this.setDirection(6); } } else { if (!this._direction == 4) { this.setDirection(6); } } this.dash(this._direction); this._dashDelay = this._dashDelayTime; AudioManager.playSe(Tomoaky.Param.JASeDash); // HERE I CAN PUT THE FILENAME CHANGES } } }};Wich function is that who let change actor filename from hero.png to hero_dash.png?
You can find the full script here
Best Regards
This plugin is from a Japanese guy, there's no documentation, anyway, everything works correctly.
It's a sort of platform/adventure plugin, it works but the character doesn't change graphic when do actions, so, jumping, dashing, etc etc it's really bad without custom graphic.
I have two ways to do that, one is with parallel process, and conditional branch but i cant identify wich string put in the "script" something like
Game_Player.prototype.dash()Doesn't work
Or o think (is way better) add a prefix and say to change filename when jump, for example
if Dash use filename hero_dash.png instead hero.png
There's a part in the code where there's a sound effect for the action i think down below is the best place to put (change filename etc etc)
Code here:
// ボタン入力によるダッシュ処理Game_Player.prototype.dashByInput = function() { if (this._dashDelay > 0) { this._dashDelay--; } else { if (Input.isTriggered('dash') && !this.isSwimming()) { if (!$gameMap.isDashDisabled()) { if (this._ladder) { this.getOffLadder() if (Input.isPressed('left')) { this.setDirection(4); } else if (Input.isPressed('right')) { this.setDirection(6); } } else { if (!this._direction == 4) { this.setDirection(6); } } this.dash(this._direction); this._dashDelay = this._dashDelayTime; AudioManager.playSe(Tomoaky.Param.JASeDash); // HERE I CAN PUT THE FILENAME CHANGES } } }};Wich function is that who let change actor filename from hero.png to hero_dash.png?
You can find the full script here
Best Regards