If you just go straight for mario like jumping on head
You can use point inside object
And in condition you would check for that point (i did not make any special point i simply check for existing center point + some offset in your case it would be CenterY point + more than half of your players height
So for example your character height is 30 so you check for Object.CenterX() Object.CenterY()+16
And +16 not 15 since 15 is half and you need something MORE than half
It could be +17 but not more)
And in addition to that you check if player is in collision with object
Also you could add multiple conditions
Like double check
Object.CenterX()-3 Object.CenterY()+16
Object.CenterX()+3 Object.CenterY()+16
This -3 +3 will offset center point 3 pixels to the left and right
So and if you put these two conditions in same events
Then it will check if both of them are inside your enemy
This will give you some range how much to the left and right your player can be from center of enemy
So for example yo do not inflict damage if you are on edge of your enemy
ALSO you could add condition (if you are using platformer behavior) player is falling
So it does not happen when you jump up but only when you are falling down
BEST thing to do would be to create object like red small square
And place it at these positions with change positions actions
Object.CenterX()-3 Object.CenterY()+16
Object.CenterX()+3 Object.CenterY()+16
And now you would see exactly where these points are
Later you would remove them from your project
But for now you would use them as visualisation to see where are these point and where your player need to be to inflict damage
And you are pretty much set