#Basic Coding Questions
1 messages · Page 1 of 1 (latest)
uh, my thread message wasn't directed towards you. Either way, you're going to have to be a bit more specific
I managed to make it work so I'm good now
I try to identify the gameobject that I collided by typing collision but I can't seem to make it work
void OnCollisionStay2D(Collision2D collision)
{
if (collision.gameObject.CompareTag("Defender"))
{
damageReceived = GameObject.Find(~~**collision**~~).GetComponent<MoveRight>().damageDealt;
health = health - damageReceived;
}
}