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).
So, any ideas what went wrong, and possibly a solution to what I want to achieve?
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
◆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
◆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?