[Help] Unkown delay between attack animation.

0 favourites
  • 4 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hey guys!

    New to the Scirra, Construct, and the forums.

    Ive been working on a project just to get my feet wet with coding and making games. So far I have figured a good amount out via the subs and sites like youtube, but Ive come across a minor issue that is making my head hurt lol.

    The game I am making is a basic platform hack-n-slash system with Dark Souls / Castlevania influence (most definitely not publishing, just experimenting).

    I am going the state machine route for animation and my question is this:

    How do I decrease the time between attack animations and what is causing it?

    Here is my .capx

    drive.google.com/uc

    Excuse my most likely disastrous code, as I am completely new to all of this haha.

    Thanks!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I looked at your CAPX.

    You have a wait 1.2 seconds and you are resetting the player to idle anytime it is not attacking so that is causing the delay between attacks. The player goes back to idle only after the 1.2 seconds expires so not a quick reaction if you want multiple attacks one right after the other.

    I don't use State for player mechanics which can cause delays and odd actions for that very reason.

    If you have buttons down or multiple clicks without reading when button or click is up you get weird results.

    I would rewrite it without using State but it is good practice so try some different ways of setting your player to idle only when nothing ELSE is happening including standing on the platform.

  • Hey lamar, thanks for the feedback.

    The reason I have the 1.2 second wait time is to get the animation to stop looping on time, and to also disable player movement for the duration of the attack animation.

    For some reason the animation loops and I feel if I can figure out how to prevent the states from looping animations I should be ok to use the wait time at a lower value. But I also dont believe that is the only element affecting the attack interval.

    I will definitely look at re-writing without states, Thanks!!

  • Your animation was looping because of the every tick event. I removed that and did some editing to help fix your animations and make them seamless like intended, even if it's a slightly unclean solution.

    https://dl.dropboxusercontent.com/u/589 ... Souls.capx

    Edit: linked the wrong file (or rather wrong directory), it's fixed now

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