Search Unity

Help: Ability System with scriptable objects

Discussion in 'Scripting' started by Sven2905, May 29, 2017.

  1. Sven2905

    Sven2905

    Joined:
    Sep 29, 2016
    Posts:
    1
    Hey guys,

    I'm pretty new to unity and I'm trying to make a small RPG game.
    At the moment I'm giving a ability system a shot. I made a database which contains scriptable objects so far. But now I get stuck at adding methods to them. How can I combine my database items with methods (which clearly make the skills unique)?

    Thank you in advance!
    Sven
     
  2. Narkata55

    Narkata55

    Joined:
    Feb 25, 2017
    Posts:
    63
    Are you using inheritance? If so, what I'm doing in my project is using virtual methods. So you define a base virtual function in the parent Scriptable Object and then you can use override in child SO's to create functionality for just that specific ability while keeping the same function name and inputs throughout for easier referencing