Hi all, I'm brand new and following along in a basic Platformer tutorial. I'm setting up a behavior for the player to kill the enemy by jumping on him, Mario-like. I've got the beginnings of it set up and working, but I don't know why it works. Right now the player jumps on the enemy and the enemy jumps up. This will be expanded on, but it's the start of his death animation.
Here's what it looks like:
This works when the Player.Y is less than Worm_Green.Y-41, but how would I come up with the 41 number? I got it by displaying Worm_Green.Y-Player.Y on collision, and then I jumped on him and noted what was displayed. But how else could I learn this?
The player is 80x100 and the worm is 48x48.
Thanks in advance!