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

#1 2012-07-15 14:45:55

General514
New Scratcher
Registered: 2012-07-15
Posts: 2

How do I make a sprite die?

Can anyone help me? I'm trying to make a sprite die. How do I do this?

Offline

 

#2 2012-07-15 17:30:14

GreenCloud
New Scratcher
Registered: 2012-07-12
Posts: 46

Re: How do I make a sprite die?

What do you mean?
Just make it turn 90 degrees right.  smile

Offline

 

#3 2012-07-15 17:36:23

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: How do I make a sprite die?

Depends on what you mean.


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#4 2012-07-15 18:38:38

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: How do I make a sprite die?

You might have it set up to respond to a Broadcast message and have it change to a "dead" costume.

when I receive [Sprite Dies v]
switch to costume [Dead v]
turn cw (90) degrees
You might also have to find a way to stop any motion that the sprite might be doing.  That can be hard...there's no way to interrupt a Glide block that I have found.  But if you have motion set up with a Repeat block of some sort, you might set a variable that stops that loop.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#5 2012-07-16 01:24:49

jedidiahzhu
Scratcher
Registered: 2011-01-16
Posts: 85

Re: How do I make a sprite die?

Quite simple, really.

If you want it to flicker and then disappear:

when gf clicked
show
wait until <(lives)=[0]>
repeat (10)
hide
wait (0.1) secs
show
wait (0.1) secs
end
hide
If you want it to fall down:

when gf clicked
show
point in direction (90)
switch to costume [Alive v]
wait until <(lives)=[0]>
turn cw (90) degrees
switch to costume [Dead v]

Offline

 

#6 2012-08-02 19:44:13

thornshadow111
Scratcher
Registered: 2012-07-31
Posts: 23

Re: How do I make a sprite die?

I am making a asteroid dodge game. how can a sprite die by color? this is what I tried but didn't work.      if touching color brown, switch to costume 2 [dead].


smile   sad    wink   
                 Now my face hurts.

Offline

 

#7 2012-08-02 19:47:19

thornshadow111
Scratcher
Registered: 2012-07-31
Posts: 23

Re: How do I make a sprite die?

I need help,fast!
                                               neutral


smile   sad    wink   
                 Now my face hurts.

Offline

 

#8 2012-08-02 19:51:48

thornshadow111
Scratcher
Registered: 2012-07-31
Posts: 23

Re: How do I make a sprite die?

:[ :\  neutral   hmm  :] ;[ ;\ ;| ;/ ;]


smile   sad    wink   
                 Now my face hurts.

Offline

 

#9 2012-08-02 20:07:57

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

Re: How do I make a sprite die?

thornshadow111 wrote:

I am making a asteroid dodge game. how can a sprite die by color? this is what I tried but didn't work.      if touching color brown, switch to costume 2 [dead].

Fixed your code:

if (touching color [brown]?)
 switch to costume [Dead v]
end
Anyway, is there some way you could give me a copy of your project to look at, or some of the scripts other than what you've said so far? It would be very helpful if you did because I can't draw any conclusions from what your just telling me. Sorry.

Last edited by ErnieParke (2012-08-02 20:09:44)


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

Offline

 

#10 2012-08-03 01:33:16

bluecat600
Scratcher
Registered: 2012-02-12
Posts: 500+

Re: How do I make a sprite die?

If you want it to dissapear:

hide
is a good block.


I gaze off into the boundless skyline, noteblock choirs playin in the sunshine, turn round pick up my sword and wield the blade that once forced evil mobs to yield, if this battle shall leave me slain, I know Herobrine still calls my name, better just take a stand, that was when I ruled the land.

Offline

 

#11 2012-08-03 17:28:15

maxamillion321
Scratcher
Registered: 2011-06-17
Posts: 500+

Re: How do I make a sprite die?

when[Sprite Dies v]
switch to costume [Dead v]
turn cw (90) degrees
hide

Last edited by maxamillion321 (2012-08-03 17:33:36)

Offline

 

#12 2012-08-04 01:35:15

jedidiahzhu
Scratcher
Registered: 2011-01-16
Posts: 85

Re: How do I make a sprite die?

thornshadow111 wrote:

I am making a asteroid dodge game. how can a sprite die by color? this is what I tried but didn't work.      if touching color brown, switch to costume 2 [dead].

Did you snap a forever block around it?

Offline

 

#13 2012-08-04 19:26:45

CylonToast
Scratcher
Registered: 2011-10-06
Posts: 1000+

Re: How do I make a sprite die?

thornshadow111 wrote:

:[ :\  neutral   hmm  :] ;[ ;\ ;| ;/ ;]

Please refrain from spamming un-needed smilies. It clutters up the topic.

Last edited by CylonToast (2012-08-04 19:27:10)


https://lh3.googleusercontent.com/-Axvm8TlDHc4/Tocl0m1Z39I/AAAAAAAACAI/j32nzVU69DU/animated-peanut.gifhttp://gifsoup.com/webroot/animatedgifs/136991_o.gif

Offline

 

Board footer