I would make an invisible collision sprite that follows the enemy around above their heads. Put it in a container with the enemy. If player overlaps that kill sprite for more than say 0.25 seconds destroy the enemy.. that's the easiest way I can think of doing it.
actually make the sprite narrow enough and center it over the enemy and you dont even need a delay really, since they technically have to be like halfway over the head of the enemy to kill it.
Thanks a lot, but yes..that didn't work because I wanted to kill the player if it touches the enemy elsewhere than head. Appreciate your help : )
In Mario, kill versus death when the player touches an enemy is decided by whether the player is falling or not.
I tried that but sometimes its falling and touches the enemy on its side instead of head, so it didn't work well.
One of the things I love about Construct2 is you're able to test for overlaps at an offset. That way you don't actually need a separate object for collision testing purposes.
It didn't work as expected.
Is that .capx are you looking?
That capx is from the new beta verion.. I've the r168 version currently, so didn't try : ( but thanks!
Just make a small sprite sticked on the enemy's head, whenever your character touch the sprite the enemy dies
Perfect! Worked like a charm. Thanks a ton!
I created another sprite (just as the way — described) but instead of putting it in a container with the object, I pinned it to the object. That made it work perfectly.
Thanks a lot everyone