Discuss Scratch

suhrguitar2019
New to Scratch
8 posts

How to set health to each individual clone

I am making a shooting game. The enemy clones in the game supposedly to have individual health separated from other enemy clones and is to be hidden whenever the health reach zero. But whenever I destroyed one of them the rest would be gone as well and I realized all clones health are connected to one single variable. Does any one know how to assign health to each individual clone???

Please have a look into the game and help me out. I have been stuck here for a while

Your text to link here…
deck26
Scratcher
1000+ posts

How to set health to each individual clone

You need health to be a variable ‘for this sprite only’ if you want each clone to have its own copy. Create a new variable, change any scripts referring to the old variable and then delete it.
codentag
Scratcher
100+ posts

How to set health to each individual clone

Change the enemy health variable to local (only available to Sprite) to keep separate values for clones.

“Don't ask about the byte mark.” - Visit my Profile: @codentag

Wintergatan in note blocks


codentag
Scratcher
100+ posts

How to set health to each individual clone

@deck26 Whoops, my bad, we were 2 seconds apart hehe

“Don't ask about the byte mark.” - Visit my Profile: @codentag

Wintergatan in note blocks


suhrguitar2019
New to Scratch
8 posts

How to set health to each individual clone

Got it, Thanks

Powered by DjangoBB