Bouncing back to same height after falling (platformer)?

Get help using Construct 2

Post » Sat May 21, 2016 8:21 pm

Just a short question here: how do I set the sprite to bounce back to the same height after falling in a platformer game?

Here is the .capx file: https://goo.gl/2HXgyO

Thanks in advance!
B
21
S
6
Posts: 33
Reputation: 1,340

Post » Sun May 22, 2016 6:26 am

I can't open the capx because you're a version ahead of me but all you need to is (for clarity I'll say your platform object is called 'bob')

Bob On platform landed > set bob vector Y to -bob.PlatformJumpStrength :)
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Sun May 22, 2016 1:14 pm

Thanks for the help, @mikehive ! However, it wouldn't set the player's jump height back to its original height.
Is there another way to do this?
B
21
S
6
Posts: 33
Reputation: 1,340

Post » Sun May 22, 2016 2:10 pm

Um, you could try

Bob On platform landed > Bob simulate control 'jump'

Basically makes the game automatically jump for you every time you hit the floor. I'm surprised the other method didn't work for you though, I tested it on a throwaway project here. If you can post another capx I'll see if I can sort my system out to let me open it :)
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Sun May 22, 2016 2:14 pm

Sure, @mikehive ! Here's the lin to the full file (uncompressed). You'll have to manually extract it from the zip, though.
https://drive.google.com/open?id=0B11op ... 0ZMNkhaN3M
B
21
S
6
Posts: 33
Reputation: 1,340

Post » Sun May 22, 2016 6:08 pm

Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Sun May 22, 2016 6:11 pm

That's the one! Thanks, @mikehive !
B
21
S
6
Posts: 33
Reputation: 1,340

Post » Sun May 22, 2016 6:14 pm

My pleasure :)
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 8 guests