How do I make this animation work? cap attached

0 favourites
  • 11 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • Hello. please help.

    I am trying to get this animation to work. Basically I want the character to have the throw animation playing when W key is pressed.

    It works only if i disabled the top two. Anyone know what i code/events i should add? Please help, I am really struggling with animations and switching between them.

    Many thanks

    [img=

    ]

  • You should put those events inside this:

    -On key W is NOT pressing down

    To avoid the condition that you on floor and not moving.

  • Hi buddy, i tried doing that and inverting it it but it didn't work.

  • Sorry it is my bad,

    This is new solution:

  • Buddy, that worked perfectly. Thank you so much. When the game is complete I will give you a mention in the credits. That was taken me ages to figure out.

    I seen a few youtube videos where the dude uses string states for animations, but it was getting confusing because i have multiple animations.

    Does this work because the "state" is set to platform?

    Again I really appreciate your time and help because you have saved me hours buddy.

  • Is it because the state is the platform and 0 is false and 1 is true?

  • Thank you!

    Actually, the variable "state" will let you divide for many situations while playing the game.

    In your game, state 1 is throwing, state 0 is idle, you can add state 2 to attack, state 3 to do something else.

    You can tweak it to reach the result which you need.

  • Hi, I'm really sorry to keep bothering you but I'm quite enlightened with this, but a tad confused why it works.

    The global variable I presume means false. (Set to 0)

    Then the system is set to 1 (which I assume is true)

    But below system is "if player is on platform is idle"

    Then the system is set to 1 (when w is pressed) I'm just confused as to why this works, and how that variable relates to throw?

    Sorry about this man.

  • Ah because your player always on platform, when you press W, it will switch back to idle instantly. No chance for you can see the throw animation.

    When I add the state, it will have to wait until it finished the throw animation and change to the state that not equal 1.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, I see now. Thanks for all your help with this buddy, I will send a link to the game when its done. I just want to make sure its polished and good and everything looks and plays well.

    Thanks again pal :-)

  • No problem.

    Can't wait to play your game :)

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