Forum begins after the advertisement:


[Customisation] Adding abilities to characters

Home Forums Video Game Tutorial Series Creating a Rogue-like Shoot-em Up in Unity [Customisation] Adding abilities to characters

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15331
    Xav
    Bronze Supporter (Patron)
    Helpful?
    Up
    1
    ::

    Hello Terence and thank you for your work. I have a small question. I want to add abilities to the different characters ( like 3 abilities per char) and those abilities will be different regarding the character.

    The first one Id like to implement in the Dash ability, but I’m gonna need the currentMoveSpeed and the moveSpeed from the PlayerStats / CharacterData script right ?

    Should I create a script for this ability ? Or a script for all abilities ? Or should I use a script already existing ?
    ( because I’m worrying about movespeed being changed in one script and not the other in game)

    I hope my question is clear ^^

    Thank you for your help !

    #15332
    Terence
    Keymaster
    Helpful?
    Up
    0
    ::

    Creating an ability system is quite complex. There are many ways to go about doing it, and a lot of the finer considerations will depend on how you want your ability system to work.

    Personally, I will create a ScriptableObject for abilities, the same way we have a scriptable object for weapons. The first thing I will look at is whether it is practical to make the Ability a subclass of Item (paired with AbilityData), the same way Weapon subclasses Item. The difference between Weapon and Ability is that weapons are “passive” effects, in the sense that they activate by themselves; whereas abilities only activate when you click on a button (either in the UI, or on the keyboard). Otherwise, like weapons, they also have cooldowns and different stats.

    For the dash ability, I would create an ability that adds a buff to the character. That buff will cause the character to dash towards a certain location for a short duration.

    If you are not in a rush, you can consider waiting for Part 23, because I will be covering how to create a buff / debuff system for the player and enemies. Your ability system will work better if it is built on top of this buff / debuff system.

    #15333
    Xav
    Bronze Supporter (Patron)
    Helpful?
    Up
    1
    ::

    I understand.

    I’ll wait for the part 23 to put them into buff then, and just prepare them on the side until then !

    Thank you !

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: