Discuss Scratch

reynboots
New to Scratch
1 post

How to make a sprite pick up and drop another sprite in a specific location

Hi, I'm trying to make a collect as many as you can game with a chicken and egg. Once the chicken picks up the first egg, more eggs should appear but I've been struggling with having the egg stay in the drop off location and having more eggs appear. I was going to make individual sprites for each egg but that seems tedious so I tried using the duplicate tool but it's not yielding the results I need. This is my first project overall in scratch, I think I got ahead of myself. If anyone can help, it would be awesome!
awesome_guy6856
Scratcher
100+ posts

How to make a sprite pick up and drop another sprite in a specific location

Use clones.
when green flag clicked
show
create clone of [myself v]
hide

when I start as a clone
go to [starting position v]
wait until <touching [player v] ?>
create clone of [myself v]
A setup like this, or similar to this, should work for your game.

This will be more efficient than using several sprites.

Last edited by awesome_guy6856 (Aug. 10, 2020 03:08:09)


i made TABS in scratch look https://scratch.mit.edu/projects/429591956/
freshBOT
New to Scratch
59 posts

How to make a sprite pick up and drop another sprite in a specific location

when flag clicked
show
create clone of myself
hide

when I start as a clone
go to starting position
wait until touching player
create clone of myself



freshBOT
Unity | Scratch | Java
ALWAYS HAPPY TO HELP
AwesomeCoder4424
Scratcher
2 posts

How to make a sprite pick up and drop another sprite in a specific location

Im trying to use 1 sprite. You use a helicopter to pick up the sprite and drop it onto a platform. The problem is,when the helicopter drops the sprite it stays in the air. However, when I try to make the sprite fall,the helicopter flies weirdly.
deck26
Scratcher
1000+ posts

How to make a sprite pick up and drop another sprite in a specific location

AwesomeCoder4424 wrote:

Im trying to use 1 sprite. You use a helicopter to pick up the sprite and drop it onto a platform. The problem is,when the helicopter drops the sprite it stays in the air. However, when I try to make the sprite fall,the helicopter flies weirdly.
Probably best if you share what you have so we can focus the help correctly,
AwesomeCoder4424
Scratcher
2 posts

How to make a sprite pick up and drop another sprite in a specific location

The progect im using is a remix of “2D Helicopter Simulator”.
OrangeSlender
Scratcher
5 posts

How to make a sprite pick up and drop another sprite in a specific location

reynboots wrote:

Hi, I'm trying to make a collect as many as you can game with a chicken and egg. Once the chicken picks up the first egg, more eggs should appear but I've been struggling with having the egg stay in the drop off location and having more eggs appear. I was going to make individual sprites for each egg but that seems tedious so I tried using the duplicate tool but it's not yielding the results I need. This is my first project overall in scratch, I think I got ahead of myself. If anyone can help, it would be awesome!
firstly,have variables for the chickens x&y-rpresented by CX and CY respectively

so if i read that correct you need the chicken to carry eggs

when green flag clicked
if =<<touching [chicken v] ?> then
go to x: ((CX) - (whatever you want)) y: (CY)
create clone of [myself v]
end
if <touching [dropoff v] ?> then
change [score v] by (1)
hide
go to [random v]
show
end
[scratchblocks]
when I start as a clone
[scratchblocks]
forever

[scratchblocks]
go to [random position v]
[scratchblocks]
if =<<touching [chicken v] ?> then
go to x: ((CX) - (whatever you want)) y: (CY)
create clone of [myself v]
end
[scratchblocks]
if <touching [dropoff v] ?> then
change [score v] by (1)
hide
go to [random v]
show
end
[/scratchblocks]
end
[/scratchblocks]

feel free to make adjustments as i think i have made mistakes
also ignore the random ends and scratchblocks blocks,i hope you still can read it

Last edited by OrangeSlender (April 6, 2024 14:10:03)

Powered by DjangoBB