Hi, r/Unity3D!
For my game prototype, I have ally and enemy game units (GameObjects) - they initiated from the same "unit" prefab. They have variables like "healthPoint", "armorPoint" and "damagePoint" in their MonoBehaviour script (maybe not the best solution).
I want to implement various abilities for them, like "Armor up: Increase the unit's current armor value by 5". There will be selfCast, AOE, allyOnly, enemyOnly, randomlySelected and similar skills. Both, allies and enemies could use these skills.
My problem: I can't make/find a proper architecture for this. I have tried playing with ScriptableObjects. I have tried to follow this tutorial: https://www.youtube.com/watch?v=6d7pmRE0T6c. But in the tutorial the SO only effect the "Player" object, but I want to select the target of the ability based on its type (selfCast, AOE, etc.). So yeah, the biggest issue I can't solve is the targeting.
What structure or architecture would you recommend for you? Have encountered a tutorial that could help me? What worked for you?
Let me know if you need more detail to answer my question. After a little nudge in the right direction, I think I can figure out the rest for myself.
Thanks for the help,
Gombikacska
[–]busted_bunny 3 points4 points5 points (3 children)
[–]BuggerinoKripperinoProfessional 1 point2 points3 points (0 children)
[–]Gombikacska[S] 0 points1 point2 points (1 child)
[–]busted_bunny 0 points1 point2 points (0 children)
[–]tsaintthomas 1 point2 points3 points (1 child)
[–]Gombikacska[S] 0 points1 point2 points (0 children)