Discuss Scratch

Sommerlund
New Scratcher
12 posts

If touching costume 2?

Hey. You control sprite 1. sprite 1 must not touch the sprite 2. but when taking sprite 3, sprite 1 becomes deadly for sprite 2. and sprite 1 switches costume to another costume, but how do i get sprite 2 to understand it must not touch sprite 1 when it's in another costume?


Thanks hope it's understandable!
anpelina
New Scratcher
1 post

If touching costume 2?

slm
UniMog
Scratcher
58 posts

If touching costume 2?

Hi Sommerlund

Is this the sort of thing you're trying to do ?
http://scratch.mit.edu/projects/18275405/
Sommerlund
New Scratcher
12 posts

If touching costume 2?

UniMog wrote:

Hi Sommerlund

Is this the sort of thing you're trying to do ?
http://scratch.mit.edu/projects/18275405/

Thank you UniMog
This works!

My next problem now is. When sprite 1 costume 2 touches sprite 2 clones, all clones disappears, and not just the one that sprite 1 touches.
What to do then?
Mactabilis
Scratcher
81 posts

If touching costume 2?

You can check this project that I made and you can look in the script –> http://scratch.mit.edu/projects/17540919/#editor

I did this but a little more complex

whenIstartasacloneforeveriftouchingsprite 1?thendeletethisclone
Sommerlund
New Scratcher
12 posts

If touching costume 2?

Mactabilis wrote:

You can check this project that I made and you can look in the script –> http://scratch.mit.edu/projects/17540919/#editor

I did this but a little more complex

whenIstartasacloneforeveriftouchingsprite 1?thendeletethisclone


But i only want the clone to delete itself when touching sprite 1's costume 2.
Right now, the problem is just that, all the other clones are also getting deleted.

Last edited by Sommerlund (Feb. 22, 2014 18:55:50)

turkey3
Scratcher
1000+ posts

If touching costume 2?

Sommerlund wrote:

Mactabilis wrote:

You can check this project that I made and you can look in the script –> http://scratch.mit.edu/projects/17540919/#editor

I did this but a little more complex

whenIstartasacloneforeveriftouchingsprite 1?thendeletethisclone


But i only want the clone to delete itself when touching sprite 1's costume 2.
Right now, the problem is just that, all the other clones are also getting deleted.
iftouchingsprite 1?andcostume #ofsprite 1=2
UniMog
Scratcher
58 posts

If touching costume 2?

Hi Sommerlund

@turkey3 is correct. See the updated project at http://scratch.mit.edu/projects/18289578/

I've rearranged the code between the two sprites to take advantage of turkey3's suggestion.
Sommerlund
New Scratcher
12 posts

If touching costume 2?

Thank you guys so much i will post my game here when it's done!
tigerboy1004
Scratcher
1 post

If touching costume 2?

Hey everyone i need a similar piece of help,

if touching sprite 2 on costume 2 it doesn't change costume to costume 3?
Rdoogan12
Scratcher
2 posts

If touching costume 2?

How do you get the if and equals blocks?
deck26
Scratcher
1000+ posts

If touching costume 2?

Rdoogan12 wrote:

How do you get the if and equals blocks?
Try not to necropost - this topic is very old.

The colour of the blocks gives you the clue as to where to find them. The equals is in the Operations block and the if is in the Control blocks.
Rdoogan12
Scratcher
2 posts

If touching costume 2?

Thanks for some reason on my computer the colors were wrong.
TheDipler
Scratcher
10 posts

If touching costume 2?

How do you make it so that only a particular costume can hit something such as a bug in my game where if you're holding a tower it can hit enemies and I want to make it so only projectiles can damage enemies in this game https://scratch.mit.edu/projects/419629981
deck26
Scratcher
1000+ posts

If touching costume 2?

TheDipler wrote:

How do you make it so that only a particular costume can hit something such as a bug in my game where if you're holding a tower it can hit enemies and I want to make it so only projectiles can damage enemies in this game https://scratch.mit.edu/projects/419629981
Please create a new topic rather than necroposting on one from 2014.
bombs_away66
New Scratcher
3 posts

If touching costume 2?

help im making a pizza game but i need the customers to sit when i get a certain costume\pizza
bombs_away66
New Scratcher
3 posts

If touching costume 2?

help im making a pizza game but i need the customers to sit when i get a certain costume\pizza
SMKAS
Scratcher
500+ posts

If touching costume 2?

bombs_away66 wrote:

help im making a pizza game but i need the customers to sit when i get a certain costume\pizza
Please don't necropost. Necroposting is when you post on an old or resolved topic.

Also make your own topic to ask a question.
bombs_away66
New Scratcher
3 posts

If touching costume 2?

k so im kinda confused
Vaibhs11
Scratcher
1000+ posts

If touching costume 2?

bombs_away66 wrote:

help im making a pizza game but i need the customers to sit when i get a certain costume\pizza
Many people are necroposting in a 2014 forum. We don't wanna see another person necroposting. So only if he is active these days, somebody tell him to close this forum with the link

Powered by DjangoBB