Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » If touching costume 2?
- Sommerlund
-
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!
Thanks

- UniMog
-
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/
Is this the sort of thing you're trying to do ?
http://scratch.mit.edu/projects/18275405/
- Sommerlund
-
12 posts
If touching costume 2?
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
-
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
I did this but a little more complex
- Sommerlund
-
12 posts
If touching costume 2?
http://scratch.mit.edu/projects/17540919/#editorYou can check this project that I made and you can look in the script –>
I did this but a little more complex
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
-
1000+ posts
If touching costume 2?
http://scratch.mit.edu/projects/17540919/#editorYou can check this project that I made and you can look in the script –>
I did this but a little more complex
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.
- UniMog
-
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.
@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
-
12 posts
If touching costume 2?
Thank you guys so much
i will post my game here when it's done!

- tigerboy1004
-
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?
if touching sprite 2 on costume 2 it doesn't change costume to costume 3?
- deck26
-
1000+ posts
If touching costume 2?
Try not to necropost - this topic is very old. How do you get the if and equals blocks?
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
-
2 posts
If touching costume 2?
Thanks for some reason on my computer the colors were wrong.
- TheDipler
-
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
-
1000+ posts
If touching costume 2?
https://scratch.mit.edu/projects/419629981Please create a new topic rather than necroposting on one from 2014. 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
- bombs_away66
-
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
-
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
-
500+ posts
If touching costume 2?
Please don't necropost. Necroposting is when you post on an old or resolved topic. help im making a pizza game but i need the customers to sit when i get a certain costume\pizza
Also make your own topic to ask a question.
- Vaibhs11
-
1000+ posts
If touching costume 2?
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 help im making a pizza game but i need the customers to sit when i get a certain costume\pizza
- Discussion Forums
- » Help with Scripts
-
» If touching costume 2?