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

#1 2012-11-06 07:02:36

conflict871
New Scratcher
Registered: 2012-09-13
Posts: 3

How do i make a sprite, when in range, take damage

Hey guys I'm making a tower defence game for school and i can't seem to get my turret to do any damage to the enemy sprites... any help?

Offline

 

#2 2012-11-06 19:30:23

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: How do i make a sprite, when in range, take damage

First of all, you'll need a health variable for the sprite. Then, whenever it gets hurt, use this script:

change [health v] by (-1)//Change for the different tower types.
The rest I figure you'll know how to make. Anyhow, I hope that this helps!

Last edited by ErnieParke (2012-11-06 19:31:03)


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer