How do I check if a platformer character has jumped over an object (like Donkey Kong Arcade)?


#1

I’m making an arcade game similar to Donkey Kong, where the character can jump over a barrel, the barrel is destroyed and the character gets points. The current version I have will destroy and create sound effect if the character is above a certain Y pixels above the barrel, but it destroys all the barrels at once and destroys the barrels too quickly before the character has jumped all the way over. I’m using Physics 2.0 so the barrels will roll down a ramp.


#2

If it deletes all your instances, you should use a for each object event or identify the object you want through a variable or anything else.
If it deletes the object too quickly, you can add a timer or find another condition, like checking the distance between the objects, or comparing their X position.