I have 4 same objects with private variable "hp". When "hp" is equal "0" object is destroyed, but it also destroys every other same object. How to avoid that?
If its just sprite.value("hp") = 0, destroy, then it should work.
Try hp <1, if it still happens its a bug or how the picking is set up.
Develop games in your browser. Powerful, performant & highly capable.
Hmm.. still destroys every object.. here's a screen:
I still have the same problem... Here's a screen:
<img src="http://i.imgur.com/a9Ifp.png" border="0" />
Might be something wrong with your other events.
Just tried a new cap wiht this only and it works ok :
+ MouseKeyboard: On Left Clicked on Sprite
-> Sprite: Subtract 1 from 'hp'
+ Sprite: Value 'hp' Less or equal 0
-> Sprite: Destroy
Maybe check if the event decreasing the health value isn't depleting all instances variables?