Damage Enemies and Objects with Guns | Gun Series 3




Published: 15 Nov 2022

Learn how to extend our ScriptableObject-based gun system to support damage with 4 damage options:

1. Static damage

2. Damage Range

3. Static Damage with Distance-based Falloff

4. Damage Range with Distance-based Falloff


After implementing the damage, we will implement a small system to manage dealing damage to arbitrary objects, including enemies. This is handled with an IDamageable interface and EnemyHealth.


⚫ LowPoly Eyeball Model: https://assetstore.unity.com/packages/3d/characters/creatures/low-poly-character-flying-eye-fantasy-rpg-175320?aid=1101l9QvC


👨‍💻 As always, all code from this video is available on GitHub: https://github.com/llamacademy/scriptable-object-based-guns/

Each video has its own branch, so you can check out "part-3" branch to get only what's been implemented so far!


🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: https://www.jetbrains.com/store/?section=personal&billing=yearly


📚 Other Helpful Videos:

⚫ Gun Series 1 Shooting, Bullet Trails: https://youtu.be/E-vIMamyORg

⚫ Gun Series 2 Bullet Spread/Recoil: https://youtu.be/pwq7F5DeQnI

⚫ Enemy Roaming AI: https://youtu.be/3hXkdARwREo


Connect on Social Media

Some links may be affiliate links, which at no additional cost to you, gives LlamAcademy a small portion of the purchase.