Battle Actor movement when selected

Hi everyone. First of all I tried to look if the topic was already in the forums but I didn't found nothing, so I'm sorry if this was already asked, but really i didn't found nothing, not here neither on google.

I want the Actors move diagonal when they act, or maybe vertical, but not horizontal. Here's a quick explanation with crappy lines over a screenshot of my project (please, don't judge the visuals; art and interface is still under development):
60efdc8d5e428c65183e1da1dc879207642c0352.png

Also, I want my Actors to don't move when they are selected to perform an action.

I tried looking into the main .js in the game (I already edited them to sucessfully modify some game graphic parameters) but I can't find when this is setting. I find some functions in the sprite.js for movements of the sprites, but I'm unable to find where the game tell the sprite to moves when selected for an action or to attack, etc.

I hope my english is good enough and, in advance, thanks to everyone.
I could suggest you to use plugins, specifically the yanfly's action sequence pack, I think they would still move when they are selected... but you will be able to setup where they will move on specific actions/skills:

Espero eso te ayude... 😤
Be careful of editing the base code files: apart from possibly causing incompatibility with plugins and making it difficult to track your changes, it also means that if/when you update your project's code to a newer version, all your changes will be lost. It is better to write a small plugin with overrides for the methods you want to change.

I think this is the method you're seeking; to override the existing method in the base code you can save this as a .js file and import it like a plugin:
Code:
Sprite_Actor.prototype.stepForward = function() {
    this.startMove(-48, 0, 12);
};
You can change the -48 to a 0, or simply remove the method call entirely, e.g.
Code:
Sprite_Actor.prototype.stepForward = function() {};
(The numbers are x, y, and duration in frames.)

Alternatively, if you're using Yanfly's Battle Engine Core, that plugin has a "Step Distance" plugin parameter...set that to 0, see if that works. 🙂
Thank you guys! I already figured out.

The thing is I had a weird sense of deja vu, because I kind of remember me fixing it. And the think is VE Battle Graphic Setup just override the changes I did in the Sprite.js. BUT, what I did this time is, changing the stepForward function to call move into a diagonal movement AND comment the line of the stepforward call in the line that says "if (this._enemy.isInputting() || this._enemy.isActing())"

Also, I read several times about not modifying the core js... well, what I do, not only with the core, but with a lot of plugins, is comment with a concise string (in my case I use "medit") and then save a copy. That way if the core update, I just search fot all the "medit"s in the old version. Also I just don't modify thing: I copy the line, I comment the line and then modify it:

Example:
95a1d004a7fdaa61477ec039446851325f317319.png


I guess everyone have their own tricks 🙂

Anyway, thanks (y gracias) you two for helping me! Back to work :3

Original thread: https://forums.rpgmakerweb.com/threads/battle-actor-movement-when-selected.116035/