Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » A drag and drop game where you feed characters
- canarycat2000
-
500+ posts
A drag and drop game where you feed characters
Suppose you're making a game where you drag different foods to different characters.
I want it to be drag and drop, where the character only eats the food when you're giving to them, and you release the mouse.
Is there a way to do this?
I want it to be drag and drop, where the character only eats the food when you're giving to them, and you release the mouse.
Is there a way to do this?
- canarycat2000
-
500+ posts
A drag and drop game where you feed characters
Also, I would like the characters to react when you're hovering food over them(before you give it to them)
How do I program that as well?
How do I program that as well?
- Scratchtheguy1
-
100+ posts
A drag and drop game where you feed characters
if <mouse down?> thenwill it work?
...
end
if <touching [ ???] ?> then
broadcast [ eat]
end
Last edited by Scratchtheguy1 (Feb. 20, 2025 19:50:04)
- HighlaneGamingStudio
-
100+ posts
A drag and drop game where you feed characters
Food sprite:
when green flag clicked
set drag mode to [draggable v]::sensing
forever
if <<not <mouse down?>> and <touching [character v] ?>> then
broadcast [eat v]
hide//Change to delete this clone if you're using clones, or go to (0) (0) if you want it to reset to its original position.
end
end
- Discussion Forums
- » Help with Scripts
-
» A drag and drop game where you feed characters