- Home /
Weapon Database wtih scriptable objects
Hey all, i currently have na inventory system that works based off of Scriptable Objects, this inventory system is heavily based on the one that Kryzarel teaches on youtube. What i now need to do is to add weapons to the game and unfortunately im confused on how to go about this. I see many ways but i don't see the correct option. For exemple, do i create a Base Weapon and derives from the Item Scriptable Object so that it gets basic properties such as name and itemIcon?
Would i then add a subclasse such as MeleeWeapons and put all code for melee weapons in their? But then i would need to create a script for each melee weapon right? Quite frankly im extremely confused about this and anything that points me in the right direction is appreciated. Bottom line is that i need to add diferente types of weapons whilst being able to add them to an inventory. I understand that im not being very clear so if anyone is left with any questions feel free to ask. Thank you.
there is no one way of program$$anonymous$$g and one way of doing things, i imagine that you are usnig the scriptableobject class as a parent class for the icons and names, the most common way of doing this then is having a class child of the scriptableobjectclass, one class per type of weapon (i imagine one for range and one for mele) then you will only need to create rather than scriptable objects from the parent create ones from both mele and range classes (since they are child of the scriptable objects you will be able to do it)
Answer by Optrix · Jul 01, 2019 at 06:31 AM
If this is about a particular persons scripts (Kryzarel), perhaps you can get in touch with them instead?
Your answer
Follow this Question
Related Questions
Referencing a class defined within a ScriptableObject 0 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
adding inventory items is half-working 0 Answers
How to persist design-time data (excluded from the final game)? 1 Answer