0 Favourites

Doubts with animation by melee attack

  • Hello everyone,

    Only a few months I started messing with the Construct2 and the manuals and some topics of the forum here I learned a lot of things. I am very grateful to everyone for that.

    With that I started my project.

    I'm making a platform game with a hero who basically will have melee attacks, transformations and a lot of other things that I still have to learn how.

    Well, I have the sprites with animated movements, and has managed to do the basic game play, runs right left, jumps, lands, in order the basics .... But now I am studying how to make him defer attack, sprites and have even tried to do something like this:

    condition:

        press space

        is on the floor

    action:

        Set Animation "1hit"

    It does not work .. Can someone please give a hint or show some good example of something ...

    Ps: Sorry if this is repeated, but I found nothing specific like that, so ...

    Thank you.

  • I have never had a problem with animation but I'm sure it's probably simple like the capitalisation of the h

  • The animation to happen, but only when the player is running, and stop other animations work properly while you are pressing the attack button.

    Here Capx: dl.dropbox.com/u/55988144/Temp/Project_test.capx

  • Here is a quick fix based off what I'm currently doing for my own game, although it's probably not the best solution so if anyone has any better approach I'd also be pretty interested to hear it.

    dl.dropbox.com/u/56373295/Construct%202%20Files/Melee%20attack.capx

    All I've done is create an event which checks that "1hit" isn't playing and made all the other animation events a sub-event of that one. I also have one more event which is not a sub-event that checks when "1Hit" is finished and sets the animation back to "Parado".

    On a somewhat related note how come Construct 2 considers an animation to be playing even if it has reached the end of its frames is there some kind of setting I need to change? I know it's only a few extra events but I'm not keen on having to put in an event for each attack which tells construct 2 to change animations once it?s finished.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Ah ninja Vercingetorix.

    Well, I have made quite a few other change.

    Note that you don't have to duplicate action anymmore for your Wolf or Normal mode. It's all handled in a global variable (can be an instance variable if you want too, it's programming design choice)

    Also I prefer to use a boolean to check if you are attacking. It's the same idea as Vercingetorix but I like booleans (programming design choice too).

    And using a boolean can also help on Vercingetorix's "related note" I guess

    Also drxbellini you should be carefull about your platform collision. I'll explain it to you with ASCII art now

    If your colision are like that   \______/   you will get stuck when you are against the platform and try to jump.

    So I modified the polygon to be more like |_____|

    Actually I even at little tiny unperceptibly pushed a bit toward /___\ just because there's no alignement system for collision point yet so I wasn't 100% sure they were vertical.

    Here is the capx

    beliniPlatformer.capx

  • Thank you so much everyone for all the attention and time spent on it.

    I am grateful for the help ... really thank you ...

  • Looks good drxbelini.

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