A heavily modified RPG Maker XP game project that makes the game play like a Pokémon game. Not a full project in itself; this repo is to be added into an existing RMXP game project.
Other
208
stars
398
forks
source link
Tapping the movement keys does not allow movement #218
You have to hold the movement key for the movement input to be recognized.
Due to update_command_new running even when standing still, @lastdir = dir is always set to 0 so the logic does not work properly.
I naively fixed it like this. I think it makes sense to run this part of the code only when there is movement to process, but I'm not confident enough in it to make it a PR.
diff --git a/Data/Scripts/004_Game classes/008_Game_Player.rb b/Data/Scripts/004_Game classes/008_Game_Player.rb
index 8f49870b..e9746a8c 100644
--- a/Data/Scripts/004_Game classes/008_Game_Player.rb
+++ b/Data/Scripts/004_Game classes/008_Game_Player.rb
@@ -432,11 +432,11 @@ class Game_Player < Game_Character
dir = Input.dir4
if $PokemonGlobal.forced_movement?
move_forward
- elsif !pbMapInterpreterRunning? && !$game_temp.message_window_showing &&
+ elsif dir > 0 && !pbMapInterpreterRunning? && !$game_temp.message_window_showing &&
!$game_temp.in_mini_update && !$game_temp.in_menu
# Move player in the direction the directional button is being pressed
if @moved_last_frame ||
- (dir > 0 && dir == @lastdir && System.uptime - @lastdirframe >= 0.075)
+ (dir == @lastdir && System.uptime - @lastdirframe >= 0.075)
case dir
when 2 then move_down
when 4 then move_left
When you try to move in the direction you're facing by tapping the corresponding movement key, the movement is not registered.
nomove.webm
You have to hold the movement key for the movement input to be recognized.
Due to
update_command_new
running even when standing still,@lastdir = dir
is always set to 0 so the logic does not work properly.I naively fixed it like this. I think it makes sense to run this part of the code only when there is movement to process, but I'm not confident enough in it to make it a PR.
yesmove.webm