Noob Question

Get help using Construct 2

Post » Sat Dec 29, 2012 3:08 am

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.
B
23
S
6
G
3
Posts: 122
Reputation: 2,922

Post » Sat Dec 29, 2012 6:57 am

@MAVERICK
See under 'Custom controls' on this manual page.
(Lots of good things in the Manual )
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Sat Dec 29, 2012 7:55 am

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.
B
23
S
6
G
3
Posts: 122
Reputation: 2,922

Post » Sat Dec 29, 2012 2:02 pm

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).
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sun Dec 30, 2012 5:22 am

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.
B
23
S
6
G
3
Posts: 122
Reputation: 2,922

Post » Wed Jan 30, 2013 9:42 pm

@Kyatic - 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?
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
113
S
20
G
8
Posts: 741
Reputation: 13,661

Post » Wed Jan 30, 2013 10:13 pm

@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
B
14
S
6
G
2
Posts: 136
Reputation: 3,210

Post » Wed Jan 30, 2013 10:18 pm

@wretchshark - 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.
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
113
S
20
G
8
Posts: 741
Reputation: 13,661


Return to How do I....?

Who is online

Users browsing this forum: spacedoubt and 2 guests