Why is this happening? (Problem with sprite positioning and angle)

0 favourites
  • 5 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • Here it is how is in the game itself:

    Subscribe to Construct videos now

    The problem that is pissing me off is that the sword flash animation in the third attack is misplaced (slow down the video to see it right)

    I made the animation using 3 functions

    function 1: ready the weapon animation (when clicked the icon)

    function 2: first sword swing (at space key pressed)

    function 3: second sword swing (at space key pressed again)

    and than in the third swing (space key again) comes by calling function 2 again (I suspect that this is the cause of the problem, cus the third attack dont use function 1 but I still can't figure out how to fix it)

    The flash sprite animation and sword animation are separated because I wanted to use the same moveset to other weapons. Here is how I did it

    On Function 1 :

    On function 2 :

    On function 3 :

    The image point location:

    Tried to change it but it just turn the animation messier

    Any idea why is this happening? should I had made the animation different? I'm not the best at construct, and some things may be a little amateur.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No one?

  • No idea. The slash should be spawned on the sword. Maybe look at the slash hotspot?

  • Thanks man!I had a look but the hotspot in all frames are alright

  • Well what’s causing it will be hard to spot. The waits make it hard to know the exact order things are run. Maybe don’t let the function run until the previous one completes. After all the order you want things to run is fixed. You could also try the timeline or just make it in one function so it’s easier to follow the logic.

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