How do I check "just fell off" state of a platform object?

Get help using Construct 2

Post » Wed May 25, 2016 9:58 pm

There's this nice little functionality in the platform behaviour that allows an object to jump right after it's fallen off a platform ledge. Very handy as it means precision jumps are more forgiving. My question is, is there any way to read this "just fell off but can still jump"-state from events? The same way we can check "platform - is on floor"? Also, can we tweak how sensitive it is?
B
39
S
16
G
6
Posts: 543
Reputation: 7,619

Post » Thu May 26, 2016 1:44 am

I've been working with this lately, after reading this article: http://www.gamasutra.com/blogs/YoannPignole/20140103/207987/Platformer_controls_how_to_avoid_limpness_and_rigidity_feelings.php. Here's what I did to make a "Tolerance jump":

Global number Jump_Tolerance = 0

    (Invert) Platform is on floor
    Trigger once
    • Set Jump_Tolerance to 1
    • Wait (however many) seconds
    • Set Jump_Tolerance to 0
    Platform is on floor
    • Set Jump_Tolerance to 0
    Jump_Tolerance = 1
    • Do stuff
    • Set Jump_Tolerance to 0

Here's a .capx: https://drive.google.com/open?id=0B9cfa ... lEwa0RJODg

I'm actually trying to figure out how to allow for a "tolerance double jump", when double jump is enabled...
B
16
S
5
G
4
Posts: 29
Reputation: 3,100

Post » Thu May 26, 2016 5:29 pm

Cheers, that looks like a neat solution :) Good article too!
B
39
S
16
G
6
Posts: 543
Reputation: 7,619


Return to How do I....?

Who is online

Users browsing this forum: worm1 and 25 guests