• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

How do I make the player run faster?

bitKoder

completely unreasonable
36
Posts
7
Years
    • Seen Feb 28, 2024
    I'm looking to increase the player's running speed from MOVE_SPEED_FAST_1 (normal running speed) to MOVE_SPEED_FAST_2 (acro bike speed), but when I change the value in StartRunningAnim (in event_object_movement.c), the running animation freezes on the first frame and the player "slides" around instead. If I instead reduce the speed to MOVE_SPEED_NORMAL, the animation works exactly as it normally does. I have done a lot of digging and haven't been able to figure out how the running animation is handled. Any ideas on how I could solve this?
     
    452
    Posts
    6
    Years
    • Seen yesterday
    I'm looking to increase the player's running speed from MOVE_SPEED_FAST_1 (normal running speed) to MOVE_SPEED_FAST_2 (acro bike speed), but when I change the value in StartRunningAnim (in event_object_movement.c), the running animation freezes on the first frame and the player "slides" around instead. If I instead reduce the speed to MOVE_SPEED_NORMAL, the animation works exactly as it normally does. I have done a lot of digging and haven't been able to figure out how the running animation is handled. Any ideas on how I could solve this?

    You can fix the sliding by setting the lengths of all frames in the running animation to 4 like this:

    Code:
    index f96e52de5..bdcbea05d 100755
    --- a/src/data/object_events/object_event_anims.h
    +++ b/src/data/object_events/object_event_anims.h
    @@ -345,37 +345,37 @@ static const union AnimCmd sAnim_GoFastestEast[] =
     
     static const union AnimCmd sAnim_RunSouth[] =
     {
    [COLOR="Red"]-    ANIMCMD_FRAME(12, 5),
    -    ANIMCMD_FRAME(9, 3),
    -    ANIMCMD_FRAME(13, 5),
    -    ANIMCMD_FRAME(9, 3),[/COLOR]
    [COLOR="Lime"]+    ANIMCMD_FRAME(12, 4),
    +    ANIMCMD_FRAME(9, 4),
    +    ANIMCMD_FRAME(13, 4),
    +    ANIMCMD_FRAME(9, 4),[/COLOR]
         ANIMCMD_JUMP(0),
     };
     
     static const union AnimCmd sAnim_RunNorth[] =
     {
    [COLOR="Red"]-    ANIMCMD_FRAME(14, 5),
    -    ANIMCMD_FRAME(10, 3),
    -    ANIMCMD_FRAME(15, 5),
    -    ANIMCMD_FRAME(10, 3),[/COLOR]
    [COLOR="Lime"]+    ANIMCMD_FRAME(14, 4),
    +    ANIMCMD_FRAME(10, 4),
    +    ANIMCMD_FRAME(15, 4),
    +    ANIMCMD_FRAME(10, 4),[/COLOR]
         ANIMCMD_JUMP(0),
     };
     
     static const union AnimCmd sAnim_RunWest[] =
     {
    [COLOR="Red"]-    ANIMCMD_FRAME(16, 5),
    -    ANIMCMD_FRAME(11, 3),
    -    ANIMCMD_FRAME(17, 5),
    -    ANIMCMD_FRAME(11, 3),[/COLOR]
    [COLOR="Lime"]+    ANIMCMD_FRAME(16, 4),
    +    ANIMCMD_FRAME(11, 4),
    +    ANIMCMD_FRAME(17, 4),
    +    ANIMCMD_FRAME(11, 4),[/COLOR]
         ANIMCMD_JUMP(0),
     };
     
     static const union AnimCmd sAnim_RunEast[] =
     {
    [COLOR="Red"]-    ANIMCMD_FRAME(16, 5, .hFlip = TRUE),
    -    ANIMCMD_FRAME(11, 3, .hFlip = TRUE),
    -    ANIMCMD_FRAME(17, 5, .hFlip = TRUE),
    -    ANIMCMD_FRAME(11, 3, .hFlip = TRUE),[/COLOR]
    [COLOR="Lime"]+    ANIMCMD_FRAME(16, 4, .hFlip = TRUE),
    +    ANIMCMD_FRAME(11, 4, .hFlip = TRUE),
    +    ANIMCMD_FRAME(17, 4, .hFlip = TRUE),
    +    ANIMCMD_FRAME(11, 4, .hFlip = TRUE),[/COLOR]
         ANIMCMD_JUMP(0),
     };

    How do I make the player run faster?
     
    Back
    Top