MV [RMMV] Is is possible to "click move" without clicking?

I am trying to make a Tactical RPG based on the game rules of D&D. Evidently, its battle system will require CPU controlled enemies that move around obstacles.

Now, RMMV already performs some parts of the "movement through obstacles" bit that I want. It is already possible to click on a tile and move the player character around obstacles.

My question is: Is it possible to script a destination for the "click move" system? ie generating a click without clicking? It would be very helpful even if it can't be applied to events other than the player character.
Can you elaborate further on what you're trying to achieve? From what I gather you can just use the movement route function to have anything move to X, Y.
My question is: Is it possible to script a destination for the "click move" system? ie generating a click without clicking?
You can certainly find and call the function from the engine's code, but it is designed to move the player, not an event. However...
Can you elaborate further on what you're trying to achieve? From what I gather you can just use the movement route function to have anything move to X, Y.
You can not, there's no innate way to do that without a more complex, looping event. However...

You can do this using Yanfly's Move Route Core, which is a free plugin. That adds a plugin command you can use in move routes to move to a specific coordinate, using the pathfinding system.

It also includes script calls to be able to use that with variables and such.
So I can just simply find and call the function from the engine code. Thank you very much.

It's much more simple than I thought. That will help a lot, even if I am limited to moving the player around.

Is there a thread already written on the this very function?
Not that I know of, you'd find it in the code and figure out how to use it for your purposes.

Did you read the rest of my post? There's not really a reason to go through that when there's a free plugin available that is much easier to use and is not limited to player movement.
I had the ambition of doing it all by myself, but it quickly became more than I could handle alone. I'll take the simpler route. Thank you for your time.
You can simulate a click-to-move action like this:
JavaScript:
$gameTemp.setDestination(5, 6);
Just replace the numbers with your x & y values. This is not ideal, though, since the player can easily interrupt it.

Instead I suggest giving a character a move route containing a single Script command:
Spoiler: `Path to` script call for move route
JavaScript:
var x = 5, y = 6; var d = this.findDirectionTo(x, y); if (!d || !this.isMovementSucceeded()) { this.forceMoveRoute({list:[{code:0}]}); this._moveRouteIndex--; } else this.moveStraight(d);
Make sure to enable Repeat for this move route.

Here's a break-down of this script call:
  • var x = 5, y = 6;
    Define target coordinates (edit these values as needed).
  • var d = this.findDirectionTo(x, y);
    Get direction to move, using the built-in short-range A* pathfinding.
  • if (!d || !this.isMovementSucceeded())
    Check if direction is 0 (e.g. at destination) or movement was blocked. If so:
    • this.forceMoveRoute({list:[{code:0}]}); this._moveRouteIndex--;
      Force an empty, non-repeating move route to end the pathing.
    Otherwise:
    • this.moveStraight(d);
      Move 1 tile in the appropriate direction.
This is nice to know. Thank you.
You can certainly find and call the function from the engine's code, but it is designed to move the player, not an event. However...

You can not, there's no innate way to do that without a more complex, looping event. However...

You can do this using Yanfly's Move Route Core, which is a free plugin. That adds a plugin command you can use in move routes to move to a specific coordinate, using the pathfinding system.

It also includes script calls to be able to use that with variables and such.

I have that plugin, that's why I was thinking you could do it natively lol
Moved to: Plugin Requests

Original thread: https://forums.rpgmakerweb.com/threads/rmmv-is-is-possible-to-click-move-without-clicking.140233/