Jump on Enemy

This forum is currently in read-only mode.
From the Asset Store
Jump on candies, collect candies and earn score!!!
  • Hello! This seems easy enough, yet I haven't been able to pull it off.

    What I'm trying to do is have the player be able to jump on the enemy and destroy them, like Mario, then bounce off.

    For this scenario we'll assume the player's floor detector has the platform movement, not the player's sprite.

    My initial thought was this event:

    Player Floor Detector Y greater than Enemy Y

    +

    Player Floor Detector collides with Enemy

    +

    Player Animation "Jump" is playing

    =

    Destroy Enemy, Player Floor Detector= Jump

    Now, the problem is that it doesn't work for me. I tried compare height but I guess that means sprite height, not actual position height. Also, all my enemies are under the family "enemy" and I cannot compare the detector's Y to the family enemy's Y (I suppose that is too ambiguous, so doing the event for each enemy wouldn't be so bad)

    Any ideas? Me feels so stoopids...

  • I think it's because of this:

    "Player Floor Detector Y greater than Enemy Y"

    That should be if the detector's Y position is LESS than the enemy's Y position. Less is higher, greater is lower. Unless that's not how your code is setup.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AHHHH BEAVER!

    LOL right on linkman!

    2 MiNUTES LATER UPDATE:

    YES! It works great! Thanks duder!

  • No prob'. Glad I could help.

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