Samarium
Ok so, if I understood correctly something like this should recover my HP after dying:
onDead(player: RpgPlayer) {
player.allRecovery();
},
but it does not work, as you can see in this video: https://imgur.com/9D4yxEs
On the other hand onLevelUp
works perfect:
onLevelUp(player: RpgPlayer, leveledUpBy: number) {
player.showAnimation('level-up', 'default');
player.allRecovery();
},
Your example does not work too:
onDead(player: RpgPlayer) {
const currentPlayer = RpgWorld.getPlayer(player.id)
currentPlayer.allRecovery();
},
The second issue is that after level-up I have 794/700 HP (visible at the end of the above video).
I know this GUI is custom, but the same is for the built one.