GM:S 1.4 [SOLVED ]Sprites Stop Animating Need Help

Discussion in 'Programming' started by dawson2223, Sep 15, 2016.

  1. dawson2223

    dawson2223 Guest

    I'm using a sprite for north, south, and the same sprite for east and west, just flipping the xscale.
    The animation for the south sprite works fine.

    When I try to go in a different direction, the object goes to the correct sprite, but it doesnt animate anymore. So it goes to the proper sprite I assigned and moves, but it doesn't do its animation, it just stays on the first image.

    I'm attaching a screenshot of the coding.

    Anyone know how to fix this?


    Attached Files:

  2. obscene

    obscene Member

    Jun 21, 2016
    Your else statement is only applying to the last IF, so if vspeed is not > 0 your image index will be set to 0 regardless of any of the previous statements.

    The proper way is...

    if this
    else if this
    else if this
    else if this
    else that
    dawson2223 likes this.
  3. dawson2223

    dawson2223 Guest

    That worked! Thanks so much!
    obscene likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice