An easy way to deal out damage to a character

Scenario: in your shooter, you have a character that can get hurt. When he gets hurt you want to do stuff as well, like play and audio clip
or put up a blood splash or something like that. There’s an easy way of doing this without using BroadcastMessage or GetComponent.

THIS VIDEO SHOWS YOU HOW! :smile:

I would upload the code but it’s too simple :slight_smile:

If you like the video I’ve got a few tutorials up already and will be posted more every Wednesday.

Cheers.

Why not use GetComponent()? Honestly, the easiest way is to write a component, have that deal the damage, manage the health, play sound, particles, whatever. Attach that to your gameObjects and use GetComponent() where necessary.