How do I use setget in a array variable?
My variable was not an array, here is the old script:
var max_health = 0 setget set_max_health
func set_max_health(value):
max_health = value
And the new one:
var max_health = [0, 1, 2] setget set_max_health
func set_max_health(value):
max_health = value
My question is, how am I supposed to change the function "setmaxhealth" in order to change correct "max_health" element?
I mean, the:
max_health = value
Thanks!