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

#1 2011-07-07 12:59:18

rojasscratches
Scratcher
Registered: 2011-06-01
Posts: 59

how do you make an enemy die

hmm  im making a scrolling game but i dont know how to mke an enemy die if you jump on it pleeease help  hmm


smile   neutral   sad   big_smile   yikes   wink   hmm   tongue   lol   mad   roll   cool  cool  Scratch Home Page  cool

Offline

 

#2 2011-07-07 13:02:22

rojasscratches
Scratcher
Registered: 2011-06-01
Posts: 59

Re: how do you make an enemy die

im accepting all answers even if you dont know how ill still try your idea  smile


smile   neutral   sad   big_smile   yikes   wink   hmm   tongue   lol   mad   roll   cool  cool  Scratch Home Page  cool

Offline

 

#3 2011-07-07 14:09:04

Dinoclor
Scratcher
Registered: 2010-06-10
Posts: 1000+

Re: how do you make an enemy die

You could try this (I don't know if it works). Draw a colour on the top of the sprite using the paint editor that is nowhere else on the sprite. Then put this script in the player sprite. You'll need a different colour for every enemy sprite.

<when green flag clicked>
<forever>
<if><touching color[ colour ]
<broadcast[ kill enemy 1 ]
<end>
<end>

Then, in the enemy sprite:

<when I receive[ kill enemy 1 ]
<hide>

Remember to use different colours for the top of each enemy sprite. Also, you'll need one broadcast for every enemy.


This is a temporary signature. It will exist until I think of something witty.

Offline

 

#4 2011-07-07 14:17:37

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: how do you make an enemy die

You could try these options.
Make a color for the player sprite for his bottom stuff like shoes, a different color than the rest.

Enemy sprite:
When Flag clicked
forever
if touching color (player sprite shoes color)
hide
(but you wanna put show at the beginning for him to show!)

The second option:
make a variable called lets say shoehit
hide it
When flag clicked (player sprite do this)
set shoehit to 0
Enemysprite
When flag clicked if touching sprite 1
change shoehit by 1

When flag clicked
forever
if shoehit equals 1
hide OR
repeat 10
change ghost effect by -10 (but you would have to do clear graphic effects at the beginning.)

Hope it helped!


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#5 2011-07-07 16:12:02

rojasscratches
Scratcher
Registered: 2011-06-01
Posts: 59

Re: how do you make an enemy die

Thanks!!! But I'm probably gonna go with Dinoclor's suggestion cuz I don't want shoes on my character but thanks TheScratch3  cool


smile   neutral   sad   big_smile   yikes   wink   hmm   tongue   lol   mad   roll   cool  cool  Scratch Home Page  cool

Offline

 

#6 2011-07-07 19:34:24

Shin23
Scratcher
Registered: 2011-01-30
Posts: 100+

Re: how do you make an enemy die

rojasscratches wrote:

Thanks!!! But I'm probably gonna go with Dinoclor's suggestion cuz I don't want shoes on my character but thanks TheScratch3  cool

Well you don't need shoes you can just make a little tiny dot of a different color on the player sprite.


http://scratch.mit.edu/static/projects/Shin23/1957329_med.png New Super Mario Bros. Scratch! (beta)
PSN: shauthegreat23

Offline

 

#7 2011-07-07 21:47:02

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: how do you make an enemy die

Shin23 wrote:

rojasscratches wrote:

Thanks!!! But I'm probably gonna go with Dinoclor's suggestion cuz I don't want shoes on my character but thanks TheScratch3  cool

Well you don't need shoes you can just make a little tiny dot of a different color on the player sprite.

Well, that was what I was referring to. Welcome rojscratches.  big_smile


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

Board footer