Stand Still and Turn

Discussion in 'RPG Maker MV' started by Parallax Panda, Oct 7, 2019.

  1. Parallax Panda

    Parallax Panda Got into VxAce ~2014 and never stopped... Veteran

    Messages:
    692
    Likes Received:
    1,032
    Location:
    Fukuoka, Japan
    First Language:
    Swedish
    Primarily Uses:
    RMMV
    I tried to make a system using Yanfly plugins that allowed the player to hold down shift and press down, left, right or up in order to turn the character without taking any unnecessary steps. This would give the player more control in some cramped puzzle areas.

    The first plugin used are Button Common Events to override the [shift] key to trigger common event 1 (seen bellow) instead of dash. Since there's no need for dash in my game anyway and the shift key is a very comfortable key to use.

    The second plugin used is Stop Player Movement. In the common event bellow you can see I use the plugin commands "StopPlayerMovement" and "AllowPlayerMovement". The idea of that is to freeze the player in place while forcing the player to turn in desired direction.

    This might not be the most elegant solution but I actually thought it would work (well, it didn't. Like not at all).

    ◆Label:StillHoldingShift
    ◆Plugin Command:StopPlayerMovement
    ◆If:Button [Shift] is pressed down
    ◆Comment:---
    ◆If:Button [Down] is pressed down
    ◆Set Movement Route:Player (Wait)
    : :◇Turn Down

    :End
    ◆Comment:---
    ◆If:Button
    is pressed down
    ◆Set Movement Route:Player (Wait)
    : :◇Turn Left

    :End
    ◆Comment:---
    ◆If:Button
    is pressed down
    ◆Set Movement Route:Player (Wait)
    : :◇Turn Right

    :End
    ◆Comment:---
    ◆If:Button [Up] is pressed down
    ◆Set Movement Route:Player (Wait)
    : :◇Turn Up

    :End
    ◆Jump to Label:StillHoldingShift

    :End
    ◆Plugin Command:AllowPlayerMovement​


    So, any ideas what went wrong, and possibly a solution to what I want to achieve?

     
    #1
  2. Meike

    Meike ||Telling Stories Through Games|| Veteran

    Messages:
    77
    Likes Received:
    92
    First Language:
    English
    Primarily Uses:
    RMMV
    #2
  3. Bex

    Bex Veteran Veteran

    Messages:
    1,266
    Likes Received:
    299
    First Language:
    German
    Primarily Uses:
    RMMV
    Remove your Plugins.
    Create a Parallel Common Event and Activate its condition switch at game start.
    Insert the following Eventcode:
    ◆If:Button [Shift] is pressed down
    ◆Comment:---
    ◆If:Button [Down] is pressed down
    ◆Set Movement Route:Player (NOOOOOOOOOOOWait)
    : :◇Turn Down

    :End
    ◆Comment:---
    ◆If:Button left
    is pressed down
    ◆Set Movement Route:Player (NOOOOOOOOWait)
    : :◇Turn Left

    :End
    ◆Comment:---
    ◆If:Button right
    is pressed down
    ◆Set Movement Route:Player (Please remove the Wait , i mean noooooo Wait)
    : :◇Turn Right

    :End
    ◆Comment:---
    ◆If:Button [Up] is pressed down
    ◆Set Movement Route:Player (Noooooo Wait)
    : :◇Turn Up
    This works, but i dont know if it works like it is for your case in particular.
     
    #3
  4. Parallax Panda

    Parallax Panda Got into VxAce ~2014 and never stopped... Veteran

    Messages:
    692
    Likes Received:
    1,032
    Location:
    Fukuoka, Japan
    First Language:
    Swedish
    Primarily Uses:
    RMMV
    @Meike
    Yeah, wow. That sounds like a more polished version of what I wanted but... it doesn't seem to work anymore? doesn't matter how slightly I tap my keys, my characters moves. Is it just me or has the plugin not been updated to the newest version of MV mayhap?

    @Bex
    Thanks, I'll give it at try at the very least.
     
    #4
  5. Meike

    Meike ||Telling Stories Through Games|| Veteran

    Messages:
    77
    Likes Received:
    92
    First Language:
    English
    Primarily Uses:
    RMMV
    Ohhhh I think I know what's up....I thought it was broke too but then realized it didn't work if your charrie was in auto dash....that could be an issue....sorry I forgot about that.
     
    #5
  6. Parallax Panda

    Parallax Panda Got into VxAce ~2014 and never stopped... Veteran

    Messages:
    692
    Likes Received:
    1,032
    Location:
    Fukuoka, Japan
    First Language:
    Swedish
    Primarily Uses:
    RMMV
    @Meike
    Wow, thanks! That was it. I guess I just have to turn off dash all together since it's not needed anyway. Seems to work fine now. In fact, it's close to perfect! :kaoluv:
     
    #6
    Meike likes this.

Share This Page