Enemies in Side-Scroller Can't Jump

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I'm trying to modify DavidN's fastloop platform movement engine to move multiple enemies at once rather than a single player. I'm doing this by having the two colision sensors( The mask and the detector) jump from enemy to enemy so fast it's as if they're with every enemy at once.

    Horizontal movement works fine.
    Vertical movement works fine except for jumps. For some reason, enemies can jump if they're standing on platforms, but not obstacle backdrops and obstacle-like objects! What am I doing wrong here? Please login to see this attachment.

    If it's any help, the main problem is that if you look closely at the detector, you'll notice it is never overlaping obstacles, but just hovering right above them, a single pixel higher than it should be. This does not happen when the enemy is above a platform, for some reason.

    The only difference event-wise is the order: Platform-detecting comes first, then there's a pair of events that move the enemy 1 pixel up or 1 pixel down( this does not happen if a platform is detected, because that first event will end the loop), and the final events test for obstacles getting detected.

    One would think that the problem could be fixed simply by bringing those last events up so that they're right after the platform-detecting one, but no matter what order I put them in, the bug just gets worse. Is there a correct order, or is what I am attempting fundamentally impossible? It seems like there should be a way to do this...

    Makin' games since Klick 'n' Play!
    One of these days I'll actually finish one.

  • I really didn't look too much through the events but I came up with an easy fix for you. :)

    edit: Just change the floor detector position to be at 0,1 of your enemy character. :)

    Please login to see this link.

    My examples:
    Please login to see this link.
    Please login to see this link.
    Please login to see this link.

    Edited once, last by Konidias (May 30, 2012 at 8:50 AM).

  • That's odd... what did you do exactly? I did it and all of them could jump.

    Please login to see this link.

    My examples:
    Please login to see this link.
    Please login to see this link.
    Please login to see this link.

  • Under the detector's Event Editor column, I replaced every "Set position at (0,0) from Klunkle(the enemy)" with "Set position at (0,1) from Klunkle."

    Makin' games since Klick 'n' Play!
    One of these days I'll actually finish one.

  • Oh no, I meant just change it for the first fastloop. :)

    Please login to see this link.

    My examples:
    Please login to see this link.
    Please login to see this link.
    Please login to see this link.

  • Oh my gosh! IT WORKS! This problem has been driving me insane for over a year! Thank you so much! I can finally continue my experiments in AI, not to mention the game I plan to add to my portfolio!
    Eeeeeeee! (ノ◕ヮ◕)ノ*:・゚✧

    Hmmm... now there's a slight problem when I add back the horizontal movement. When moving from a platform to a solid obstacle, the enemies are stopped as if bumping into a wall one pixel high... Please login to see this attachment. any suggestions on that?

    Makin' games since Klick 'n' Play!
    One of these days I'll actually finish one.

  • Hmmm I tried your mfa and I'm not getting that issue... Can you specify the problem a bit more?

    Please login to see this link.

    My examples:
    Please login to see this link.
    Please login to see this link.
    Please login to see this link.

  • When an enemy first lands on a platform, and tries to move onto a solid backdrop, the "pixel-high wall" thing happens. It can step over it with a jump, and the problem doesn't happen if the enemy moves back onto the platform and try to move off it again.

    EDIT: Erasing the last bottom row of pixels on the mask solved the problem, but I don't know if that was the best solution or if that might cause problems later or something... Maybe I'm just being paranoid about that though... XD

    Makin' games since Klick 'n' Play!
    One of these days I'll actually finish one.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!