How do I correctly assign animations for so many things?

  • I've been working on a game with wall jumping, not the main point of the game but a feature I really enjoy but I can't get the animations to work.

    I found this thread viewtopic.php?f=147&t=80409&p=757794#p757794

    and asked the author for assistance but I thought I might open it up to others and see if someone has a creative solution.

    I want to assign a different animation for idle, walking, jumping, falling and wall sliding.. you'd thing one animation out of the normal set wouldn't be so difficult but wall sliding is technically "falling" as far as the code is concerned and I have no idea how to trick it in to seeing the difference. I've tried a lot of things and I'm just not that good at C2 yet.

    I've also pasted the CAPX below.

    http://dl.dropbox.com/u/45198/MMXWallJump.capx

    Thank you.

  • You could add a variable so if the character is falling while within a certain distance of a wall that it would play the wall sliding animation. Would that work? Sorry, I'm at work and can't actually look at the capx or what you've done.

  • I also have many of the same questions.

    I have something that's a little more towards the actual question though as for as .cap files go.

    What I'm trying to make is a character that moves in a "castlevania" esq way.

    I can get many of the animations to work properly but they conflict with each other a lot. I'm fairly new with construct and have searched for a few hours and haven't found much to help me.

    If you go onto Youtube and look up something like castlevania SOTN Richter you will be able to see what kind of thing I am going for. (Walk, jump, throw, whip, slide, ect).

    Any help would be greatly appreciated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If the problem is to set the animation to wall slide you can do something liek this

    if he is jumping and overlapping a solid object (wall) > set animation to wall slide.

    Of course that need more work like when he's not in this condition anymore and etc but It's all about touching or not the wall

  • You already have code to test whether the player is wall clinging with your wallcling boolean, so you can tie in setting the "Wall Slide" animation to when "wallcling" is true.

    For the rest it's just simple checks of what the player is doing, basically what I have in the image attached. The checks may change depending on what other things you might want to include, depending on the game, but as far as just getting that group of animations to work this is all you need. Some of what I have might be redundant, but it works.

  • You already have code to test whether the player is wall clinging with your wallcling boolean, so you can tie in setting the "Wall Slide" animation to when "wallcling" is true.

    For the rest it's just simple checks of what the player is doing, basically what I have in the image attached. The checks may change depending on what other things you might want to include, depending on the game, but as far as just getting that group of animations to work this is all you need. Some of what I have might be redundant, but it works.

    Does this work?

    I will try it now but I'm sure I tried this... The animations just cancel each other out..

    I'll try this and come back haha, thank you!

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