Friday, 10 March 2017

Energy/Rage generation and use

Energy is useless without things to use it on and ways to regenerate it.

In this project, Energy is used to perform Special Attacks during an attack combo to do extra damage.


In this screenshot, it shows that a special can be performed only if there is enough energy available. If the attack is performed successfully, then the appropriate amount of energy is removed from the Energy pool.

Energy is regenerated by a function timer which runs when not in combat.


Which contains this code:


Rage is generated when dealing and taking damage, as shown below:


GetRage is called when damage is received and adds based on damage taken, GenRage is called when dealing damage to enemies and adds based on damage dealt.

When Rage is at maximum, it is used to perform a high damage ultimate attack:



No comments:

Post a Comment