Jump on enemy while press button...

0 favourites
From the Asset Store
Jump on candies, collect candies and earn score!!!
  • Well, Gmoney, there is another problem u.u. If i want to jump on much enemies the double jump only works on the first and not works in the other :C

  • Hi, Nestorj66.

    All enemy units need to have Hitpoints placed above their heads. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    We can do this either by creating separate group of events for each enemy unit we create, or use Families.

    https://www.scirra.com/manual/142/families

    Here's an example capx file demonstrating the use of a Family named Family1.

    I've placed comments in event sheet 1. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    https://www.dropbox.com/s/cca8b1pqv0asy ... .capx?dl=0

    The code looks good, but there's a bug.

    There are two enemies, but if you step on the one close to the wall first, then the bug will occur.

    I think I know how to fix that bug, but I'll need more time to find the answer. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Maybe another user in the forum can help Nestorj66 with this issue by showing him/her how to pick the correct family member from Family1.

    If not, I'll be back with an answer tomorrow. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

  • I'm surprised no one helped you while I was gone, Nestorj66. <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    Anyway, I ended up spending hours trying to resolve this issue myself and finally solved it. <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Here's the example capx.

    https://www.dropbox.com/s/4v7welmk7z2xf ... .capx?dl=0

    Explained

    1. Enemies get destroyed only when Player jumps on their heads. (e.g. Enemies don't get destroyed when Player touches them without jumping on their heads.)

    2. Player bounces off after jumping on enemy's head.

    3. Player can double jump to a fixed height after jump is successful.

    4. Double jump gets deactivated after player bounces off enemy's head.

  • Really, really thank you so much

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Really, really thank you so much

    You're most welcome, Nestorj66. Oh, no problem at all. I enjoy spending time with C2, and I always learn while looking into everyone's help requests as well.

    Please ask me any time. I'll solve the problems for you as soon as possible.

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