Improved dependent event movement (ledge jumping speed, looking where they're going)

This commit is contained in:
Maruno17
2021-01-03 13:44:54 +00:00
parent cbbf6bad93
commit e35d2e766c
2 changed files with 24 additions and 16 deletions

View File

@@ -98,7 +98,12 @@ class Game_Character
end
def jump_speed_real
return (2 ** (3 + 1)) * 0.8 * 40.0 / Graphics.frame_rate # Walking speed
self.jump_speed_real = (2 ** (3 + 1)) * 0.8 if !@jump_speed_real # 3 is walking speed
return @jump_speed_real
end
def jump_speed_real=(val)
@jump_speed_real = val * 40.0 / Graphics.frame_rate
end
def move_frequency=(val)
@@ -654,6 +659,7 @@ class Game_Character
if real_distance > 0 # Jumping to somewhere else
@jump_count = 0
else # Jumping on the spot
@jump_speed_real = nil # Reset jump speed
@jump_count = Game_Map::REAL_RES_X / jump_speed_real # Number of frames to jump one tile
end
@stop_count = 0