MV Diagonal Movement

FEATURES
Adds diagonal movement for the player using the keyboard and also optionally using the mouse.
Includes an option to use diagonal charactersets to show diagonal sprites (for those who wish to use them).

VERSION 1.5 – RPG Maker MV
Download Plugin file
Download Demo

63 thoughts on “MV Diagonal Movement

  1. logan7007 says:

    Pretty useful plugin, a logical one to have. And the new pathfinding is more smart than the engine gives by default.

    But the fact that you can get around EVERY obstacle by diagonally makes the movement looks weird periodically. I mean, sometimes a game has to have tilesets wich you need to get around only by direct movements, but diagonal ones makes it look like character stepping on it, or somehow moves under the obstacle.

    Can i somehow block the diagonal movement when character gets around something?

  2. Rob says:

    Hi, usefull plugin. I am trying to set a variable when player character is facing diagonal to trigger an event.. How can i do this ?

    Ex.: if player is facing north-est( 9 on the numeric keypad) set var1 to 9.. Is it possible ?

    Thank you

    • Galv says:

      Sort of but not quite as simple. You can use script to return diagonal facing.
      $gamePlayer._diagDir

      This will return false if the player is facing a straight direction. It will return a number 1,3,7,9 (like on the keypad) for facing a direction.

  3. Yinyamina says:

    Hey Galv, is there a way to make the diagonal walk speed slightly slower? Currently, my characters look like they are speeding, but only when diagonal.

    • Galv says:

      Actually I added that but forgot to update this page. Version 1.1 has the option to change diagonal speed.

      But if you are talking about super-speed that is caused by a plugin conflict, sorry I cannot help with that

      • Yinyamina says:

        No, it’s not crazy speeding, its just the same speed as walking normally, but because its going diagonal it looks faster. Another thing I noticed was when walking diagonally over a region effect, it doesn’t seem to trigger. (Using your map animations plugin) I’ going to keep playing with it and see if it is just a plugin conflict.

      • Galv says:

        Try moving the diagonal movement plugin before the map animation effects plugin. That’s the position in my working project.
        If still doesn’t work then I’m sure it’s another plugin conflict like you said.

        The diagonal speed issue should be fixed with the latest diagonal update :)

      • Yinyamina says:

        Thanks I think that did it.

  4. That God Who Never Died says:

    Hey Galv,
    Is it possible to make a plugin where the character only move diagonal, I’m using isometric maps.

  5. Galv says:

    Sorry I am too busy to do requests at the moment.

  6. Blunderbusta says:

    I noticed in the demo that your actor manually or via mouse click avoids taking diagonal shortcuts near the fence corners, sometimes you can’t move diagonal at all near the fence pieces. Is there a fix for this I’m not aware of- I know it’s possible because other diagonal movement scripts have done so but do not provide the additional diagonal movement frames.

  7. I send bug reprot here friend.

    http://forums.rpgmakerweb.com/index.php?/topic/48860-yep-yanfly-engine-plugins-newest-self-switches-variables-plugin-count-113/&page=195#comment-637810

    Bug description:
    Plugin Name: YEP_EventChasePlayer.js
    Bug Explanation: Framerate DROP down to 1fps when use this plugin and the plugin Galv’s Diagonal Movement

    MV Diagonal Movement

    Error Report: nothing
    Exact Steps on How to Replicate Bug: install Galv’s Diagonal Movement and YEP_EventChasePlayer.js
    _______________________________________________________________________________________
    A small bug.
    I saw your plugin on youtube and it’s great.
    I just installed it with much joy.
    Because it replaces another.
    However, because your plugin has an 2 FPS, when a monster we track.
    I disabled all the plugin, and it would be that you use incompatible scripts.
    I noticed that this happened with the diagonal plugin Galv.
    with a solution?.
    I think of a variable conflict in the javascript can be?

    Thank you friend.
    Edited just now by Jonforum

  8. Caedisia says:

    Is it possible to use a 3-frame idle with 8-frame walking and running?

  9. Galv says:

    Updated to version 1.4 to calculate diagonal move speed better so it doesn’t conflict with some plugins.

    Doh, created an issue with followers. Reverting to 1.3 until I work out why.

  10. Arthur says:

    Hi, i use your script and he’s awesome, but now i have some trouble, in my game i need use direction move lock, and now i know 1 script for this, and he’s don’t work with diagonal movement, (Movement Direction Lock by HIME), mb u know how fix this? Sorry of my english and thx for attention!

    • Galv says:

      The diagonal mouse doesn’t work well. You can disable it.
      Sorry, I think I misread. If the two plugins don’t work together then they are not compatible unfortunately.

  11. tonjense says:

    Hi, can you please explain what you mean by ‘ The new sprite used will be in the position directly below the selected character graphic’. It’s not clear to me what I should do to make the switch…

  12. Galv says:

    Updated to 1.5 to add diagonal charset when using ‘turn toward player’ event command and the player is on the diagonal position

  13. startamerz says:

    So if I want a right sprite to walk in that direction we need to use our own huh?

  14. Mike says:

    I don’t know if this has since been updated, but when using the jump command, MV still defaults to one of the up/down/left/right sprites. Is there a way to use the diagonal sprite I’ve created for use with this plugin?

    Thank you for your work, by the way. Great stuff!

  15. AA says:

    Is it possible to have the events also moving diagonally?

  16. AA says:

    Sorry, it makes me looks dumb. :)
    I was testing with the other demo, the ones including all 3 features (diagonal, multiframes animation).
    Now I’ve tested the new demo and yes… the new guys move in diagonal. However… I was expecting for something else…

    For example, I was testing with the Approach movement, and the event is following me but walks only in zig-zag, he is not following me by walking diagonally.
    This is what I was trying to accomplish…

    Thanks!

  17. AA says:

    I tested with Victor’s Diagonal Plugin and it seems it can also be enabled to work for events, not only chars. But his multi frame I think works in a different order…
    I’ll see if is possible to merge the plugins…

  18. Comone says:

    I was getting a really strange error with Super Orange Movement and so I switched to this. Once I realized that I needed to turn the diagonal images off (until I create some of those) I am off to the races. Thanks for this one!

  19. Lidnel says:

    Good work, really helpful!
    Just one question: can i turn my character in some diagonal direction via script line? (like in “set movement route” – turn left, right, but up-down etc)
    Thank you

    • Galv says:

      In move route, use ‘script’ and put:

      this.setDirection(1); this._diagDir = 1;

      Replace the 1 with the diagonal direction number (1,7,9,3 are diagonals)

  20. AA says:

    Any chance you could update this to work for events and chase player plugin?

    • Galv says:

      This plugin does work for events (see demo with events in motion). A different plugin would be required to move diagonals when chasing player.

  21. Erik says:

    Awesome scripts, dude! You’re the best! I’ve one question. I want to use tall sprites in my game. Would this plugin work with them, or do you need to use the default chibi sized ones?

    Thanks!

  22. I read through all the comments, and about a year ago, somebody asked if there was isometric movement possibilities. Is there any chance of you offering an option within the plugin to choose between true diagonal and isometric diagonal directions?

  23. Troquicho says:

    Hello, Galv.

    I have two questions:

    1º – I would like to have events with diagonal movement if they have random movement. Is it possible to simulate a random movement via script calls?

    2º – When I try to begin the movement with a diagonal movement, the first step is always top, bottom, left or right and the next is diagonal (you can check it on your demo). I’m not sure if this is a problem related to MV and I need to change the diagonal movement of the events by myself. Can you help me with this?

    • Galv says:

      1. You’ll need a different plugin that modifies how move routes work to do that.

      2. That’s how MV works because the movement is tile based and it moves the direction of the first key you press. Unless you press both direction keys -exactly- at the same time that will happen. You’d need another plugin to change that, too.

    • FeatherBrain says:

      To simulate random movement for events in a way that displays Galvs diagonal sprites, try something like this as a script call in a movement route:

      var d = (Math.randomInt(9) + 1); if (d === 1) { this.moveDiagonally(4, 2); } if (d === 2) { this.moveStraight(2); } if (d === 3) { this.moveDiagonally(6, 2); } if (d === 4) { this.moveStraight(4); } if (d === 5) { this._waitCount = 60; } if (d === 6) { this.moveStraight(6); } if (d === 7) { this.moveDiagonally(4, 8); } if (d === 8) { this.moveStraight(8); } if (d === 9) { this.moveDiagonally(6, 8); }

  24. guillermo says:

    Hello. I’m trying to use this plugin with the Animations one in my project. A couple of sprite tweaks in GC hub and it works like a charm for actors.
    Thing is, NPC sprites appear cut sometimes and their movement is not fluent anymore. I assume this is the plugin trying to apply diagonal movement and animations to NPCs and I must tweak NPC spritesheets to fit template too. Am I correct? Is there a way to disable plugin only for NPCs? Does it work with big ($) spritesheets or must I resize.
    Thanks in advance and congratulations for such a job. If my game gets released (non-commercially, won’t be that good) you’ll be credited.

    • Galv says:

      You should test an NPC with your diagonal charset to see if that’s what the issue is.
      If you have diagonal characterset option enabled then no, big $ spritesheet won’t work as animation required full sheet.

  25. W.M.K says:

    Galv can you please give a re-upload of the plugin file? The last one had a Trojan Virus.

    • Galv says:

      Unfortunately some virus scanners pick up false positives for rpgmaker stuff. I did an online scan and only 2 virus scanner out of 61 reported it.

  26. Dalton Sayre says:

    Hi Galv,
    I put these together to use with this script. If you can find the time to check them out, please let me know what you think. Any feedback, suggestions or advice would be MUCH appreciated. Link below:
    https://www.xyphien.com/forums/resources/5-new-robots.1683/

  27. Firecat1311 says:

    When using a diagonal charset, the Direction Fix property is ignored while facing in a diagonal direction. It’s a very simple fix so I’ve already taken care of it on my end, but I just thought I’d give you a heads up.

  28. Dalton Sayre says:

    Hi Galv. I’m currently working on some tall robot sprites to use with your diagonal movement script. I’d like to release a demo of my sprites, but I want to make it open for people to be able to use the characters for their own purpose. Is it okay to post it with your script active, to would you prefer that I release it without the script and just include a link so folks can get it directly from your page?

  29. Hello there, i’ve install your plugin and i ran into a problem. I’ve put the plugin into my project and turn it on. But, when i press up and right or up and left key (to move diagonaly) at the same time, it made my character disappear.

    Also, can the plugin be used to create side stair movement?

    • Galv says:

      Your character is likely disappearing because it’s trying to use a different character in your charactersheet for diagonal movement. Check out the demo and plugins settings to learn more. The plugin doesn’t directly do side stair movement, you might have to event that some other way.

      • shadow moonhill says:

        Sorry for the long reply. Oh okay then, thank you. I’m actually looking for plugin that can make the player move up manually (by pressing arrow about or others) so it could look natural. Do you have any suggestion on where i could find such plugin?

        I’m so frustated because i can’t find one that suits my need.

      • Galv says:

        I recommend to try asking in a forum to see if the community has suggestions for the plugin you’re after.

      • shadow moonhill says:

        Oooh,okay then. The problem was i didn’t know how to make post in the forum until recently. So, i kind of loss that day 😅😅😅. By the way thank you for te reply

Leave a comment