In the enemy script:
In the enemy script:
For an Enemy to take damage it needs:
For an Enemy to take damage it needs:
a max_health variable
a max_health variable
a way to set (update) the current health
a way to set (update) the current health
to delete the enemy if health drops to 0
to delete the enemy if health drops to 0
To set the current health to the max health in the ready function
To set the current health to the max health in the ready function