1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Problem with an animation in drag and drop

Discussion in 'Programming' started by GamingDragomachina, Jun 30, 2019.

  1. GamingDragomachina

    GamingDragomachina Member

    Jan 2, 2019
    So, in my platforming game, i wanted to make it to where you would kill enemies and break boxes with a sword. So, i made the sprites i needed, one for the character and an animation for them swinging their sword. I was able to get it the character to switch to the sword animation at the press of the shift key, however, then my sword swing animation just kept looping non-stop. How do i fix this so it only swings once for every press of the shift key?
  2. pipebkOT

    pipebkOT Member

    Dec 13, 2018

    use the "animation end" event, which is triggered when an animation ends,

    in it put:

    if sprite_index=your_sword_atackspritename

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