trouble destroying platforms in infinite jumping example

0 favourites
  • 4 posts
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • Hi,

    I'm new to Construct and i'm trying to improve the demo "infinite jumping".

    I've added some animation on jump, mirror sprite when pressing directions and destroy "last landed platform".

    However, for this last functionality, i'm a bit lost. I've managed to do it quite easily, here's the screenshot of how I did.

    This is working fine, but if I remove the delay, it doesn't work anymore and my character is falling as the platform is destroyed. Is it due to the "jump" behaviour or is there something else I missed

    Cheers :)

  • If you remove the delay, I think the platform gets destroyed before your character lands on it. Try using "On landed" event instead of "Is Overlapping at offset".

    If it still doesn't work, try "Wait 0" to wait just one tick.

  • Thanks, for your answer :)

    I used the condition "is overlapping AND platform is on floor", so normally it should jump on landing. I know it redundant because, if it's on floor, it's necessarily overlaping at y-5: I used the overlapping condition to use my platform object, so I can destroy it in the function body. Or maybe there's a way to tell "destroy platform" without using the platform object?

    I already tried to make the delay as small as possible, but it doesn't work bellow 0.02 :(

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could also use function with pick events. You don't need the function, could just put the events in the is jumping event but it might be useful to part it out.

    So:

    - On player jump call function "destroy platform"

    --(function"destroy platform")

    -- Platform - Pick Nearest to player XY

    -- Destroy platform

    demos in r212

    manual movement https://1drv.ms/u/s!AkmrWgxeuxlKhIZ8mcWqLpy5iiFs_g?e=hfYjIG

    auto movement https://1drv.ms/u/s!AkmrWgxeuxlKhIZ9c9Ogd6dw2GEAzQ?e=MnwEAj

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)