Defender Game. Health issue

I need help with the tanky dude. i need to make each clone individually have 3 hp and when you click on one, only that one loses 1 hp and not the others.

Please give a link or a picture.

just make a sprite local variable
then under when I start as a clone, set this variable to 3. This variable can have a different value for each clone.

sry me small brain

here is link:

Here's my version.

Go to the Tank Zombie sprite and do the HP coding there. I can assist you if you need assistance.

Explanation if you want to know ;D

So basically, I used the "Create Variables" library to make variables.

I have this variable called "Step" which will create a variable based on the Step number.

okay i will try to do the hp coding

its a bit confusing because i really don't know what to use the step block for because with the tank zombie, it says, "error, step does not exist in this context".

Guys, the easiest and simplest solution is to use local variables. There's no reason to use the create variables library.

Here's a basic script that shows what to do

Oh, and you can also do this to set a health for each clone without putting it under when I start as a clone

This works because clones inherit their parents sprite local variables.

also, @jens discourages using the create variables library, and has threatened to remove it many times, all because people were using it to do unnecessarily things that could be done without it. The library is only still here for use in libraries.

God, he wants to get rid of EVERY single library.

no, just the create variables the getters and setters libraries

Jens discourages using any library


uhm, no. He encourages using many libraries, for example, he uses the pipe block in many of his videos. He uses more libraries than that, but that is the only one I can think of at the moment.

It was a joke. It just seems like it, as he doesnt like people using a bunch of libraries

I don't think 2 is a bunch...

Maybe not, but 3 is very close, and one of my two local grocery stores says "3's a crowd".

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.