Another issue with animations

0 favourites
  • 13 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Alright... I'm having another problem with animations and it has been giving me headaches for quite a while now.

    All I want is to make a simple animation for when you throw an item(kinda like Mario in Super Mario World). When "lançou" is true, set the animation to the throwing animation and when finished, set the "lançou" variable to false. The problem is that the animation itself never ends, probably because as long as "lançou" is true, it will keep looping itself, but I don't know how I can solve this.

    Sorry to bother ^^'

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • We can't see what's setting it to true but when the animation finishes you do set it to false. So you are setting it instantly back to true again? Usually with a throw you can use a key press to trigger once and set the animation, then it would revert back to idle.

  • What it's setting it to true is when Z is released, you can hold objects by holding down the Z button and when you release it, the character throws the object. I already considered using the "trigger once" and it kinda works but as the condition says, it only happens once, so what should I do?

  • Oh I see, is the animation set to 'looping'? Check in the animation editor. If this is looping then it will not trigged 'on finished'.

  • Weeellll that's the thing... it isn't set to loop. Wich is weird because I did something similar with my hitstun animation and it worked just fine, sure the conditions are different but theoretically it should've worked similarly(at least in my head lol :b). Trust me, I tried every possibility I could to make this work.

  • So the animation isn't looping right it's just stuck. Probably the only option is to share the file now.

  • Ok I can't open this, I'd have to go back in time. Can you share a screenshot of the throw events and all the animations, may that will help. So the problem is that after you throw its stuck in the animation even when you walk ?

  • Yes, that's what is happening. It doesn't matter if the character jump, fall, or get hit, it's always stuck in that throw animation :/

  • Try adding a trigger once to the 'is lancou' event. If that doesn't work then let me know what lancou is set to when you release Z, is it set to false now?

    Be careful as some of your animations can try to run at the same time. In case you don't see the throw animation working at all it could be because it's trying to play idle or walk at the same time.

  • YAY I THINK IT WORKED, but I inverted the "is lançou" condition rather than "if animation is playing" because it doesn't work for some reason, what do you think? Is it a functional but "wrong" approach?

  • Yeah inverted variable condition also fine, good it's fixed!

  • Oh my God thank you so much for helping me out! And sorry for bothering with all of this animation stuff ^^'

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)