Player just jumps once

Get help using Construct 2

Post » Tue Sep 17, 2013 1:46 pm



Hi Guys, small problem:

My player moves around a planet, and needs to jump as soon as the mouse is near to him.

This works fine one time, the monster jumps one time but after that not again.

I thought the event just gets fired 1 time but it really gets fired as long as the cursor is near the player.

Does someone of you have any clue why ? I could also make an example but I hope the image is enough.


PS: Planet is solid, player is platform, default keys(YES)

Before I forgot it, if I go away with the cursor and again near to it it jumps again once... Darklinki2013-09-17 13:48:03
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Tue Sep 17, 2013 2:09 pm

It works if you run it every second. I think every tick is too fast to allow it to even do a jump so it just appears static. Although you did get it to jump once, which is confusing. Try adding a wait time of 0.1 seconds after simulate jump.plinkie2013-09-17 14:10:13
B
46
S
16
G
78
Posts: 2,168
Reputation: 46,353

Post » Tue Sep 17, 2013 2:26 pm

Thanks Plinkie, Im not sure why I forgot that... Wait 0.1 wasnt enough even wait 1 second was to short cause the player jumps to slow.

B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Tue Sep 17, 2013 2:34 pm

Ah yeah jump strength, I was using the default. Cool :)
B
46
S
16
G
78
Posts: 2,168
Reputation: 46,353

Post » Tue Sep 17, 2013 2:53 pm

If anyone will have again this problem and found this thread, a better way is to simulate the jump just if the player is not jumping. This keeps you away from problems with jump strength and slow pcs.
B
15
S
6
G
6
Posts: 512
Reputation: 5,555


Return to How do I....?

Who is online

Users browsing this forum: Armench and 16 guests