Different ammo types to kill different enemies.

I want to know what’s the best method for an AI to take damage from different ammo types.

For instance, I have a werewolf enemy. The play can shoot it with regular bulleting and it will go down but the werewolf will go down but not die from it and it will take a lot of bullets. However, if the player shoots it with silver bullets, it will stay dead and take more damage.

What’s the best way to code that? Gameplay tags, an enum of bullet types?

Thanks,

Hey @Kinos141!

Use the “DamageType” class! Create whatever ones you need for your game, then do basic Branch checks. You can plug a “DamageType” class into pretty much every “Damage” node there is, then on the “OnDamageReceived” node pull off of that and use an “=” type.

On your weapon, have a “DamageType” class variable then change that when you change ammo type, and if you’re creating a projectile with your gun you want to have a variable on the projectile for the same thing, exposed on spawn so you can pass it from gun to projectile.

Then on a werewolf it would be Branch, “Damage = Silver” T/F, on T do this thing and on F (meaning non-silver damage) do that thing. :slight_smile:

I hope that makes sense! It’s just a single DamageType variable passed around.