Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Claw game
- kawaiiprincess8258
-
18 posts
Claw game
I would like to make a claw game but am not sure how to do it. Can someone help? This is my first time posting on discuss scratch. (ᵔᴥᵔ)
- powercon5
-
1000+ posts
Claw game
Have you attempted to start the game? If so can you share it and link the project.
What do you mean by “Claw game” that could be quite a few things. Could you try to explain in detail what you mean?
Yay for discuss!
What do you mean by “Claw game” that could be quite a few things. Could you try to explain in detail what you mean?
Yay for discuss!
- footsocktoe
-
1000+ posts
Claw game
I would like to make a claw game but am not sure how to do it. Can someone help? This is my first time posting on discuss scratch. (ᵔᴥᵔ)
Put this in search box…
claw game
Choose one of the claw games and “look inside”. When you find one that seems easier to understand than the others, remix it.
- gtoal
-
1000+ posts
Claw game
I would like to make a claw game but am not sure how to do it. Can someone help? This is my first time posting on discuss scratch. (ᵔᴥᵔ)
have you got as far in Scratch yet as testing if sprites are touching, and rotating sprites around their origin?
first assumption: this is a 2D world. spread your prizes some distance apart so that when you drop the claw you're only dealing with touching one prize, not a bunch of them.
begin by designing your claw - make the claw parts sprites and make the origin of the sprite the point on the gantry where the claw is attached.
move the gantry and lower the claws, with the claws rotated to the open position
let loose the claws by rotating them inwards until they touch a prize
to do it properly you'll need a little bit of maths/physics here, but for your first attempt just do this:
raise the gantry by one pixel. if you are still touching the target, raise the target by 1 pixel too. Do this for *both* claws - one on each side of the target. if both claws were touching underneath some part then it should lift. if one claw was not touching, let it drop.
- kawaiiprincess8258
-
18 posts
Claw game
Thank you everyone! this has been a lot of help.
Btw, by claw game, I mean a game where you grab prizes.
Btw, by claw game, I mean a game where you grab prizes.
- gtoal
-
1000+ posts
Claw game
this sounded like fun so I knocked up a very quick rough draft that may give you a starting point: https://scratch.mit.edu/projects/163006687/
making the claw behave properly is where the difficulty is going to be… you will probably need to add sensors to the sides of the claws to ensure they are pulling upwards and not just touching something below themselves.
A really advanced implementation (which I really don't expect you to try - I would be hard pressed to make it work myself) would be a physics sim that took into account the pressure on the springs and the weight and center of gravity of the prizes.
Dropping a prize that is only caught by one claw in a convincing way is going to be a challenge as well!
G
making the claw behave properly is where the difficulty is going to be… you will probably need to add sensors to the sides of the claws to ensure they are pulling upwards and not just touching something below themselves.
A really advanced implementation (which I really don't expect you to try - I would be hard pressed to make it work myself) would be a physics sim that took into account the pressure on the springs and the weight and center of gravity of the prizes.
Dropping a prize that is only caught by one claw in a convincing way is going to be a challenge as well!
G
Last edited by gtoal (May 25, 2017 02:48:26)
- Discussion Forums
- » Help with Scripts
-
» Claw game