r/unity_tutorials • u/LlamAcademyOfficial • Nov 15 '22
Video Learn how to apply damage to arbitrary objects with 4 different damage modes: flat damage, random range, flat with distance-based damage falloff, and Random Range with distance-based damage falloff in Part 3 of the Gun Series!
58
Upvotes
3
u/LlamAcademyOfficial Nov 15 '22
Full Tutorial on YouTube
Hey all! Happy #TutorialTuesday!
This week is part 3 of the Gun Series, where you'll learn how to make, from scratch, a highly-customizable scriptable-object-based gun system that supports all kinds of things, like a bunch of different ways to manage how much damage will be applied, and a system to apply damage to arbitrary objects (that raises events so you can do all kinds of cool stuff!).
If you're going to have more than a couple of guns in your game, you'll likely find a prefab-based workflow becomes cumbersome to keep cleanly structured and in sync as you extend functionality, add VFX, and want to reuse configurations.
This is only part 3 in what's going to turn out to be a relatively long series. I'm going to cover other topics like:
Reloading
Fire Modes (burst/automatic/single shot)
Sounds
Projectile-based guns
Modifiers
Attachments
Skins
And more 🙂!
On previous episodes we learned why a ScriptableObject solution is preferable, how to implement that along with raycast shooting, bullet trails, simple bullet spread, and texture-based bullet spread!
As always, the full project for this video is available on GitHub!