- Advanced AI
popularité : 86
Levels and XP popularité : 94
Simple Health Bar popularité : 84
Regenerative Mana popularité : 88
Poison Status Effect popularité : 82
Strength and Armor popularité : 82
Lockpicking popularité : 88
Slide 1
Slide 2
Slide 3
Slide 4
Slide 5
Slide 6
Slide 7
Slide 8
Slide 9
Slide 10
IMAGE OR CARROUSEL for section header You successfully read this important alert message.


assets%2F-LAqwYovmUPn5V6CMeID%2F-LM2n9yQxWTQMaBgGuDB%2F-LM2qtTh69OD06z0f3TZ% (...)

(Player casting a Fireball towards an enemy)

In this case we’ll be covering how to deal damage to an enemy based on the attacker’s power and the attack receiver’s defense stats.

Attack & Defense Stats

First and foremost we need to define a couple of Stats that will be shared across all characters: The Attack and the Defense.

The Fireball

To cast the Fireball spell we need to create a Trigger that listens for a certain key (in our case the Mouse 0) so that it starts an Action that will instantiate the Fireball object.

This Fireball object will have a Trigger that detects when it collides with any game object. For every game object which it collides with, we’ll invoke an Action sequence that will reduce the health stat of the collided object.

Damage Output

We’ve previously seen how we can increase the mana of a character by a fixed certain amount over the course of time. NoTEXTE APRES FILTRAGE
-  : liste tous les intertitres de l’article
-  : liste tous les documents de l’article sous forme de mini-vignette non cliquables. Avec deux paramètres :

width : largeur de la vignette en px,
raz : nombre de vignette sur une seule ligne. Juste après la Nième(raz) vignette, un
est inséré.