Hello, how are you?
I’m new to the world of game creation and I’m starting with Phaser 3.
I need to know how to damage my character and enemies.
I’m using this.enemygroup = this.physics.add.group() to define enemies. And I have no idea how to separate them and deal damage individually.
Thanks.
That is, how to destroy an enemy individually after you have grouped them?
No idea.
However,
I completed two tutorials that had a player attack enemies in an adventure role playing game where
the enemies were defined in a separate class in a file called monster.js
Each monster was assigned a unique identifier, so that when a player’s sword continues to overlap an enemy, that enemies hit points would fall to 0 and then the monster sprite would destroy()
The two tutorials are these:
On the creation of a phaser web application
On enemy damage and hit points as well as the creation of the monster class
Good luck, hang in there.
thank you so much. I will look. Do you have a tutorial with multiple shots?
Cool. I wish I had the time to make a tutorial but I’m still learning on how to work with Phaser and JavaScript.