How can i make something that reacts depending by the type of damage?

Im sorry that the title doesn't really help or explain anything. I want to make something similar to wilk from monster hunter wilds. Essentially: Imagine an exploding barrel, and depending by the type of damage you deal, it does an explosion of said damage. My issue is: How to make different types of damage Example: Magic Physical Fire etc. The "exploding barrel" logic that differenciates the damage types And (extras): If i want multiple model variations to spawn a random model between those And (extra): If i have like a "level 1" and "level 2" charge barrel to summon one of them randomly.

My idea was to make an actor class that takes care of the main stuff, then make a children for each model variation and charge levep variation. But i still have a problem on how to separate the damage types, and making the "barrel" recognize them and then recognize the ones it can react with (with an enum for the damage typed perchance?)

Sorry if I wasn't clear, for the trouble and if i seem to be pretentious

Posted Mar 6, 2026, 8:48 PM UTC

19
Loading comments…