This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-04-22 08:20:18

Noobie600
New Scratcher
Registered: 2012-04-21
Posts: 7

It's Not Responding!!!!

Iv'e told the enemy to hide when it's health equals 0 BUT it just carries on, no question. Anyone got the solution?

Offline

 

#2 2012-04-22 08:22:34

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: It's Not Responding!!!!

What scripts exactly are you using?
It may be that it only checks once, instead of always.

Offline

 

#3 2012-04-22 08:24:44

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: It's Not Responding!!!!

I would probably need to see the scripts you are using to help you solve this. However, I have a feeling it's because you're not using the right block, so try the following:

Whenever you check the enemy's health to make it hide, instead of using

<(health) = [0]>
try using
<(health) < [0]>
(note the different sign in the middle). This will make it hide even if the sprite's health went below zero!

Offline

 

#4 2012-04-22 09:26:30

Noobie600
New Scratcher
Registered: 2012-04-21
Posts: 7

Re: It's Not Responding!!!!

When I recieve [damage]
change [enemy health] by [-2]
change [score] by [25]
if < (enemy health) < [0] >
  play sound [zombie dead]
  hide
  stop script
end

Offline

 

#5 2012-04-22 09:33:31

Prestige
Scratcher
Registered: 2008-12-15
Posts: 100+

Re: It's Not Responding!!!!

Noobie600 wrote:

When I recieve [damage]
change [enemy health] by [-2]
change [score] by [25]
if < (enemy health) < [0] >
  play sound [zombie dead]
  hide
  stop script
end

Sometimes a problem occurs if you have duplicated a sprite and used the same 'personal' variables for them both. Try changing the current

 (enemy health) 
for variables from the palette for each of the enemy sprites.
     Basically, try getting rid of the current variable blocks and adding new ones in, for each of the enemy sprites. I hope this makes sense and I hope it works too!

(also you may want to change your current if < (enemy health) < [0] > to if < (enemy health) < [1] > as that way the zombie will not be alive even if it has health = 0  tongue  )


"Don't insult someone until you've walked a mile in their shoes. That way, if they don't like what you have to say, you'll be a mile away and still have their shoes  smile  "

Offline

 

#6 2012-04-22 11:32:18

Noobie600
New Scratcher
Registered: 2012-04-21
Posts: 7

Re: It's Not Responding!!!!

that's what im using, is there somthing wrong with it?

Offline

 

Board footer