Holding key makes character jump when it lands?

Get help using Construct 2

Post » Mon Jan 20, 2014 9:34 pm

I'd like it so that instead of holding down the key assigned to 'platform jump' the characters jumps, and then doesn't jump until the button is repressed, rather the character jumps each time it lands, as long as the jump key is pressed. How is this achieved? Thanks! ~zebbi
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Mon Jan 20, 2014 10:33 pm

I'm sorry I don't understand. You want the character to continually jump while the jump key is pressed? Or do you want it to only jump each individual time the key is pressed?
B
56
S
15
G
13
Posts: 826
Reputation: 17,645

Post » Mon Jan 20, 2014 10:39 pm

[QUOTE=Tekniko] I'm sorry I don't understand. You want the character to continually jump while the jump key is pressed? Or do you want it to only jump each individual time the key is pressed?[/QUOTE]

Yes, continually jumping, ie: while the jump key is pressed, the character jumps, then lands, then jumps again immediately after landing, and so on until the jump key is released.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Mon Jan 20, 2014 10:41 pm

Are you using the "Key is Down" event? If so, I believe you need to change that to the "On Key Pressed" event. That should only trigger the event once.
EDIT: Check the post below... dpyellow2014-01-20 22:44:35
Image
B
26
S
6
G
2
Posts: 38
Reputation: 2,427

Post » Mon Jan 20, 2014 10:43 pm

OOPS! I read it wrong, It should be the other way around, sorry... Just a guess though, I'm not sure if it'll work.
Image
B
26
S
6
G
2
Posts: 38
Reputation: 2,427

Post » Mon Jan 20, 2014 10:45 pm

on key pressed - simulate jump

on landed
key is down - simulate jump.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Jan 20, 2014 10:47 pm

[QUOTE=dpyellow] OOPS! I read it wrong, It should be the other way around, sorry... Just a guess though, I'm not sure if it'll work.[/QUOTE]

I tried that, and unfortunately it just does the same thing, the character jumps and stops jumping until the jump key is pressed again! :D Any other ideas? ;)
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Mon Jan 20, 2014 10:55 pm


Is keyDown & Is Player on the Ground
then Simulate jump
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,018

Post » Tue Jan 21, 2014 9:49 am

[QUOTE=jayderyu]
Is keyDown & Is Player on the Ground
then Simulate jump[/QUOTE]

Is that the same as 'platform on floor'? If so, unfortunately, that doesn't work! :( Any other ideas? Thanks! ~zebbi
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

Post » Tue Jan 21, 2014 9:59 am

[QUOTE=LittleStain] on key pressed - simulate jump

on landed
key is down - simulate jump.[/QUOTE]

Have you tried this?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: amazingdream, Yahoo [Bot] and 20 guests