killing player

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dang_

Hi, I was wondering if anyone could help me with my current game. I would like my character to die when it comes in contact with the enemy character. Any code will be helpful. It is a 2d game

:bust_in_silhouette: Reply From: deaton64

Hi,
That’s quite a vague question, but I’d say you need to use collision detection.

Checkout some tutorials like this one and this one.