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

#1 2013-01-27 04:48:43

Whitey999
Scratcher
Registered: 2012-09-09
Posts: 5

HP for fighting

How do you make a vererable hp without it glitching to negtive numbers?  sad

Offline

 

#2 2013-01-27 05:47:41

Smozzick
Scratcher
Registered: 2011-10-23
Posts: 100+

Re: HP for fighting

when gf clicked
set [health v] to [10]
When I receive [hit v]
if <((health) - (hitdamage)) < [1]>
character dies
else
change [health v] by <[0]-(hitdamage)>
end
This bit checks for if the health will drop too low; you can replace the hitdamage variable with the actual damage as needed if you want to. Also doesn't have to be placed in a broadcast.

Last edited by Smozzick (2013-01-27 05:48:38)


http://i50.tinypic.com/ded8m.png

Offline

 

#3 2013-01-27 14:17:27

Whitey999
Scratcher
Registered: 2012-09-09
Posts: 5

Re: HP for fighting

Wow Thank You Alot  smile  smile  smile  smile  smile

Offline

 

#4 2013-01-31 03:28:15

olayemi2003
Scratcher
Registered: 2013-01-18
Posts: 34

Re: HP for fighting

i want to make sprite when touch any sprite it have to stey on the sprite like when i control a sprite, when it land on
a line it will stay on the line not moving down the line

Offline

 

Board footer