I create sprite object: 'Monster' with variable: hp. After that i create another Sprite object call 'Hero' but i can't add variable name: 'hp', then an error show that variable has register. Why?
Develop games in your browser. Powerful, performant & highly capable.
I'm guessing you did not create a new sprite Hero, you made a new instance (copy) of the Monster sprite and renamed it to Hero.
Or you may have both sprites in the same family and "hp" variable is defined on the family.
Free version non-have family,
thanks for your help