Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Dress Up games
- Miss_Smiley
-
11 posts
Dress Up games
I am making this really cool dress-up game for my OC and it's going well but… I really want the clothes to drag onto the character but they won't. I really need some help!!!
- deck26
-
1000+ posts
Dress Up games
I'm assuming you have basic drag and drop working? If not add this to the clothes sprites
When you have that working the next problem is probably to snap the clothes to the right position if close enough to the character. That should just be a case of having the costume centres set properly. For a dress the sprite can be told to go to the character - tweak the dress costume centre so that that means it is lined up correctly. For a top you probably want to do something like
When you have that working the next problem is probably to snap the clothes to the right position if close enough to the character. That should just be a case of having the costume centres set properly. For a dress the sprite can be told to go to the character - tweak the dress costume centre so that that means it is lined up correctly. For a top you probably want to do something like
If the dress item isn't close enough to the character you probably put it back at its starting position.
- peppermintpatty5
-
1000+ posts
Dress Up games
With drag and drop, you can make the clothes follow the mouse when dragged by the mouse and then snap to the character when the mouse button is released. Here is the script that follows this logic:

Hope this helps!

Last edited by peppermintpatty5 (May 25, 2015 13:58:14)
- deck26
-
1000+ posts
Dress Up games
You could just use ‘distance to character’ rather than looking at x and y separately.
- peppermintpatty5
-
1000+ posts
Dress Up games
Yep, the substitution for the pythagorean theorem that I You could just use ‘distance to character’ rather than looking at x and y separately.always forget exists!

Yeah, I should have used distance(detects in a circular area) instead of a x,y positions(which detects in a rectangular area). I wasn't thinking clearly.
- ItzSpongyTime
-
13 posts
Dress Up games
Just tap on the clothes and check off:
Draggable in game.
Hope I helped
Draggable in game.
Hope I helped

- peppermintpatty5
-
1000+ posts
Dress Up games
This topic is fairly old, try not to Just tap on the clothes and check off:necropost
Draggable in game.
Hope I helped

- Discussion Forums
- » Help with Scripts
-
» Dress Up games