+1 +2 +3 +4...

Regenerative Mana

A lot of games feature some kind of regenerative gauge. It can either be health after a short delay of not receiving damage or a small but constant increase of the energy/mana points. The Stats module's second example shows how you can implement regenerative mana as well as casting a spell only if there's enough points.

assets%2F-LAqwYovmUPn5V6CMeID%2F-LLte2DsX2ZuuIV2Qu3u%2F-LLtlWY-HZzB6WagRTlt% (...)

(The player casting a Fireball)

Mana Regeneration

To regenerate mana over time is as easy as creating a Trigger that invokes an Actions object as soon as the game starts. These Actions are:

- Increase the Mana attribute by 5
- Wait 0.1 seconds
- Restart the Actions object

This s [...]

NOT YET REGISTERED ?

  • Free acces to articles and tutorials
  • You can interact into the forums
  • Download some ressources (10% of our assets are free, but we need more supporters to continue our work and the platform must have something to share with it’s publishers ;-)

>