ELI5 EventHandlers

I’m trying to have an object simply watch another for when their OnDamaged method is called. I’ve tried a couple different ways but I can’t seem to figure out c# eventhandlers, it seems to go right over my head.

When object B is created, I’d like it to know when object A calls it’s OnDamaged() method.
When object A calls OnDamaged(), I’d like object B to call ExecuteMethod(), sounds easy?

Why can’t I get this?

Why don’t you paste the non-working code you have so that we can see which part of the process you’re missing? Barring that the best we could do is post a link to some tutorial (or just write one in a comment), which doesn’t sound like what you need. It sounds like you’ve got most of the ideas of the process and need to figure out the syntax.

Actually, I just figured it out now. My issue was with the method signature not matching the EventHandlers

I think I got the hang of this now :slight_smile: