#Scriptable Objects (and how) or seperate scripts?

1 messages · Page 1 of 1 (latest)

slow lily
#

Hello. I'm creating a turn based rpg and the method I've gone about creating Skills and "activating" these skills is stupidly complicated and is involving several scripts. I was hoping some1 might have a better idea for a solution.

Currently I have:
A Scriptable Object for each skill.
A Class script that holds all the Scriptable Objects that I want each party member/enemy to use in a list. Whenever my characters use a skill the method gets sent here where it sorts it by the name of the class then sends it to...
Finally a third script that holds the actual Class script with actions for every skill that Class can use.

so BattleManager UseSkill() -> StartingClass UseSkill() determines the class of the battler -> Class UseSkill() determines the name of the skill then uses the appropriate method.

I think all this could be easily simplified if I wrote a seperate script for EVERY skill then attached them instead of using Scriptable Objects, but I know Scriptable Objects can do some crazy stuff so maybe theres a better way.

Ideally I think the best way to solve this would be to have the UseSkill function on every Scriptable Object and have them do what I want but with SOs you don't have the luxury of fine tuning a method for every different SO.. To my understanding they all share the same method. The only thing I can see doing is moving the UseSkill from StartingClass onto the Scriptable Object instead to cut out that middleman.

http://pastie.org/p/6msKBDVjldUc683FQuJGwJ