How would I make an enemy that can latch onto the player kind of like the mini goombas in super Mario bros will?
I’m not sure what you’re looking for, sorry.
Can you describe with more details what you’d like to achieve?
Enemies that would jump onto the player and slowly drain the player’s HP.
And which part is causing trouble?
For the HP, if the two sprites are in collision, reduce the player’s HP.
For the jump, you will have to figure out the right distance to trigger the jump, depending on the enemies’ platformer settings.
You can use an object variable for the enemy - a boolean variable that tells if the enemy should be latching on the player. I’ll call my example “latchPlayer”.
if (latchPlayer == true) set X position to player.X(); set Y position to player.Y();
This has problems, though.
The enemy will not be centered, if there are multiple enemies latching they will be visible as only one, …
Just ask if you need anything more specific than that. Hope it helps