Adding Custom Controls Issues

0 favourites
  • 4 posts
From the Asset Store
Customize the animation of character when item changed
  • Hello guys,

    So I've been trying to make a custom movement for a character and I'm still getting used to C2 so I found some issues doing this.

    My problem right now is when I assign more than one key to move the character such as:

    D = Move right and A = Move left.

    The character seems just to respond to the last assigned key which was "A" key. I would be very thankful if someone more experienced could take a look at it and point out what I'm doing wrong, so I'll leave a .capx as an attachment.

    If someone if wandering where did I got the animations for this character such as running and idle, you can get them at David Hellman's "Braid Graphic Briefcase", which a link I can't post as I'm a new member of C2 community.

    Let me thank you in advance and I hope to get some help as I'm really excited learning this amazing tool. Thanks a lot!

  • Your else statement is in the wrong place.

    It only reacts to the A is down. If A is not down the else statement takes over.

  • Your else statement is in the wrong place.

    It only reacts to the A is down. If A is not down the else statement takes over.

    Hey thanks for helping, should I make a variable then? I've tried putting the else under "D" key and tried putting two elses one under "D" and another under "A" key and keeps doing the same problem.

    Thanks a lot by the way, this is very helpful.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could create a variable KeyDown.

    and add an action to A is down and D is down to set the variable to 1

    add an on any key released at the top of your inputs (so all events below will overwrite if necessary), give it the action set variable to 0

    add an event if variable is 0 set CustomMovement speed to 0

    This is probably not the best way, but it will work for now.

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