Noob Question

0 favourites
  • 8 posts
  • I have looked in the forums, but the best explanations I can find are answered for Classic Construct and not Construct 2. How do you move with "WASD" controls instead of the arrow keys.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    See under 'Custom controls' on this manual page.

    (Lots of good things in the Manual <img src="smileys/smiley2.gif" border="0" align="middle"> )

  • Thank's man. Still took me a minute to understand why my way wouldn't work. I had "On key pressed" and it has to be "On key down". I don't really understand the difference between the two when reading them aloud, but it made it work.

    You seem to know this stuff pretty good. I had more question, because I cannot find a good reference for this. I have an attack, but when in the air during a jump how would I set a different attack animation up (AirAttack)? It's a platform game.

  • The difference between "on key pressed" and "on key down" is that the "on key pressed" event will fire only when the key has been down and then is released.

    It's a trigger that only happens once whereas "on key down" can be checked every tick and is not a trigger.

    For your second question, you can use the condition "platform is jumping" and then set the animation to the one you want.

    There are a few tutorials about making platformer games in the tutorials section of the site, as well as in the "How do I FAQ" (link in my signature).

  • Thanks Kyatric,

    Now I'm working on having the animation return to falling animation. I'm starting to get a hold of a lot of things. I just gotta keep working with it.

  • - Thank you for the clarification on the two. Movement-wise, I thought I had the two well understood, but now that I'm adding an "attack" condition, they both seemed to behave the same.

    But a new problem for me arises. I want my character to attack and complete it animation sequence SIMPLY when the button is PRESSED - regardless if it's held down or released (or not). The obstacle I face is that the animation STOPS once I release the button. I've switched out both ON KEY DOWN with ON KEY PRESSED...same results. I've almost got a work-around figured out but am having trouble setting up the logic. The one idea I have is to check if the animation is still in any of its current frames by way of a variable, adding 1 to the value each tick. Once the value reaches more than the actual number of frames in the animation, THEN it goes back to normal until I give it new instructions. ...but, the problem I see is that if I set it to a dual-condition event, at least one condition - the button press/down - won't be true.

    Your thoughts?

  • Rhindon - do you have another event to reset the animation to a default pose that conflicts with it?

    ie. in pseudo code:

    when not pressing the key (or key is not down) - set animation to default

  • - I have one IN MIND...I just haven't implemented it at this very moment. But yeah, I know I'll need one. My first concern is simply getting it to respond and follow through with the whole animation with a mere key PRESS, with or without being held down or button released. If I can get that set up, doing any reset to the animation (such as an interruption from an enemy from behind) will come next.

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