#Building block ability system

1 messages · Page 1 of 1 (latest)

cold vine
#

I wanted to know if any more advanced programmers could help me plan out how to create a system for abilities using a building block style.

My idea is for every ability to made by combining premade actions and executing them in order, with each action allowing for parameters to be input such as distance, direction, duration, damage, etc.

As an example, a fireball ability would go through a process like this:

  • projectile spawned at (position)
  • move projectile in (direction) for (distance) over (duration)
  • on enemy hit, explode in (radius) and apply (damage) and/or apply (debuff)
  • on terrain hit (destroy)

Thank you in advance.

ripe valley
cold vine
# ripe valley Sounds good. Do you have a specific question on that approach?

I am seeking some general guidance on how to implement the idea. One of the specifics being how would i pass information for action parameters from the ability class to the action class?

I apologize for not being more concise with my question. I realize I have left out some crucial information such as the project being online multiplayer.

The following link is to a post I made on unity discussion for this topic, where i supply some more specifics about the project in a reply.

https://discussions.unity.com/t/help-with-building-block-ability-system/1581454/3

ripe valley
# cold vine I am seeking some general guidance on how to implement the idea. One of the spec...

I don't think the fact that it's a multiplayer game has anything to do with the system.

Anyways, is the main issue passing the appropriate parameters to your actions?
In this case, maybe a context pattern could be used? You pass in a context object that contains all the possibly required data and references for any action and the action picks from it only whatever it specifically needs.