Help with getting Crouch work

0 favourites
  • 4 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello everyone, I have got what I suspect a simple question, but I am still trying to wrap my head around on how everything works as I am an artist rather than a scripting person.

    I have looked everywhere and could not find the answer, so maybe you can help.

    I am working on a platformer and trying to add a crouch to the character. Could you either help me answering what I wrote down below or direct me to a good tutorial please.

    What I have done so far is setting an Arrow Down event which starts the crouch animation, so for as long as you hold down the character remains like that, and on arrow down release, it plays the getting back up animation.

    So the problem I am having are:

    1. The character keeps moving with the crouch animation if I press forward and then down, how do I stop that without removing the possibility in the future to add attacks and such while the character is crouched?

    2. If I keep pressing forward, then release and press down, the Crouch somehow does not start, can you tell me why?

    Thank you!

  • Hey Black Rabbit,

    It could be a number of things - feel free to share your capx file so that we could be of more service.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you crouch, disable the input from the Platform behaviour.

    When the crouch button is realeased, enable the input again.

  • Thanks, I sort of resolved the situation by adding tons of events which I Am not happy with, looks messy.

    But there is a similar issue with other animations I have noticed.

    For instance I have placed a Turn around animation now which starts when the left key is pressed, then I set to mirror the character once the animation of turning is over, which still doesn't work for some reason because by the end of the turn animation, it plays the first frame again facing the wrong way before going into mirror. As a result now when the character is running left, and I press right, it works randomly (Sometimes it turns other it doesn't)

    I am a bit concerned about sharing assets publicly over the web since my stuff has been often used without permission, so unless there is a safer way of doing it, I cannot share

    I reach new points of hope as I keep working and learning but then I get so frustrated by the randomness I just want to give up

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