Change skeletal animation using path_start

Discussion in 'Programming' started by alm3dcga, Jan 14, 2020 at 2:30 AM.

  1. alm3dcga

    alm3dcga Member

    Joined:
    Dec 25, 2019
    Posts:
    4
    Hi, I use path_start and try to change animation set if(path_position > 0.8), but new animation set does not work, it freeze. Is it a limitation of GM2? How to avoid it?
     
  2. obscene

    obscene Member

    Joined:
    Jun 21, 2016
    Posts:
    2,487
    code or it didn't happen.
     
  3. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,880
    The condition used to trigger an animation change can be anything you like - including a path_position check - as long as you are using the skeletal animation functions correctly to start the animation.

    What I suspect is happening based on your less than descriptive post is that the animation is constantly being restarted every step when path_position is > 0.8 and so will appear to be stuck and not animating when in fact it is but it never gets to go past frame 0 before you reset it.

    You will need to add a flag to your code to check whether the animation has already been started so that it isn't reset every step once path_start > 0.8.
     
    Last edited: Jan 14, 2020 at 1:50 PM
  4. alm3dcga

    alm3dcga Member

    Joined:
    Dec 25, 2019
    Posts:
    4
    Oh, thank you! I missed this moment. Now it works fine
     

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