Discuss Scratch

cooldudue
Scratcher
38 posts

how do make a sprite die when its hp reahes zero(0)

whenever one of my sprites hp reaches zero it does not die pls help
gtman
Scratcher
24 posts

how do make a sprite die when its hp reahes zero(0)

can I see a project
cooldudue
Scratcher
38 posts

how do make a sprite die when its hp reahes zero(0)

gtman
Scratcher
24 posts

how do make a sprite die when its hp reahes zero(0)

thanks
ChaoticParadise
Scratcher
46 posts

how do make a sprite die when its hp reahes zero(0)

I don't see the hp script, is it actually in there or are you generally asking how to do it?
cooldudue
Scratcher
38 posts

how do make a sprite die when its hp reahes zero(0)

its in by the walls
MegaApuTurkUltra
Scratcher
1000+ posts

how do make a sprite die when its hp reahes zero(0)

Try
Definereducehealthbyamountchangehealthby0-amountifnothealth>0hidestopother scripts in sprite deactivate sprite by hiding and stopping its scripts if health is not greater than 0, then to reduce health:reducehealthby20
cooldudue
Scratcher
38 posts

how do make a sprite die when its hp reahes zero(0)

must this be in the attacker or the sprite gettin destroyed

MegaApuTurkUltra
Scratcher
1000+ posts

how do make a sprite die when its hp reahes zero(0)

cooldudue wrote:

must this be in the attacker or the sprite gettin destroyed

The sprite getting destroyed. Make some sort of broadcast system for the attacker to send damage to the sprite being destroyed.
mastermind1201
Scratcher
100+ posts

how do make a sprite die when its hp reahes zero(0)

whenclickedifhp=0 thenbroadcastCuriosity kills the cat
whenIreceiveCuriosity kills the catswitchbackdroptoendstopall
cooldudue
Scratcher
38 posts

how do make a sprite die when its hp reahes zero(0)

for some reason none of this is woking
silverknight108
Scratcher
82 posts

how do make a sprite die when its hp reahes zero(0)

oh really *cracks knuckles* well its easy

iftouchingenemy?thenchangehealthby-1ifnothealth>0hidestopall script in this sprite
MegaApuTurkUltra
Scratcher
1000+ posts

how do make a sprite die when its hp reahes zero(0)

silverknight108 wrote:

oh really *cracks knuckles* well its easy

whenclickedforeveriftouchingenemy?thenchangehealthby-1ifnothealth>0thenhidestopall scripts in this sprite
Fixed formatting / code flow. Also this looks a lot like my previous script (minus the touching):

MegaApuTurkUltra wrote:

Try
Definereducehealthbyamountchangehealthby0-amountifnothealth>0hidestopother scripts in sprite deactivate sprite by hiding and stopping its scripts if health is not greater than 0, then to reduce health:reducehealthby20
Try not to post dups.
Domestic-_-Melon
Scratcher
67 posts

how do make a sprite die when its hp reahes zero(0)

It worked for me
confused man
DrKat123
Scratcher
1000+ posts

how do make a sprite die when its hp reahes zero(0)

Domestic-_-Melon wrote:

It worked for me
confused man
Please don't necropost. This topic is pretty old. Please check the date of the post before posting. Thanks.

Powered by DjangoBB