Making objects interact

Hello friends, I'm new here and I'd like to know how can I make two objects interact using a function. For example: person A attacks person B and person B's health lowers.
Can someone help me?
Topic archived. No new replies allowed.