Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Can you increase or reset hero's health by code?


Hi all,

Let’s say I store hero’s health at the beginning of a level in a variable called initHealth.

initHealth =

   # and then after some battle with enemies, I do a test

if < initHealth / 2: = initHealth

Is that possible ?

Thanks for your answers.


You cannot programmatically modify your hero’s (or other units or enemies’) health; it is a “read-only” property.

However, later in the game you will have access to paladins, which you can command to heal your hero and friends.


Thanks for your answer.

I thought so, otherwise it would be too easy :slight_smile:


In game dev, you can edit ur heros health/damage/speed


Please do not revive dead threads, but good point :slightly_smiling_face: