Discuss Scratch

Dakota_The_Coder
Scratcher
69 posts

How to make a love/fave detector

Please tell me if you know. I need it for a game I'm working on.
c10family
Scratcher
11 posts

How to make a love/fave detector

i used to know
Dakota_The_Coder
Scratcher
69 posts

How to make a love/fave detector

c10family wrote:

i used to know
Do you still know?
NoUsername-King
Scratcher
100+ posts

How to make a love/fave detector

To make a love/fav detector, you need to position a shape offscreen, overtop of the like or favorite button. Since you can't detect clicks offscreen, you have to just wait until the player has had there mouse over top of the button for a few frames, then do whatever you need to do if they like/fav. The overall code should look like this:
whenclickedswitchcostumetolike positionwaituntiltouchingmouse pointer?broadcastliked
the liked position should be offscreen on the costume editor, where the like button would be if the costume stage outline was the stage on the project page.
Dakota_The_Coder
Scratcher
69 posts

How to make a love/fave detector

NoUsername-King wrote:

To make a love/fav detector, you need to position a shape offscreen, overtop of the like or favorite button. Since you can't detect clicks offscreen, you have to just wait until the player has had there mouse over top of the button for a few frames, then do whatever you need to do if they like/fav. The overall code should look like this:
whenclickedswitchcostumetolike positionwaituntiltouchingmouse pointer?broadcastliked
the liked position should be offscreen on the costume editor, where the like button would be if the costume stage outline was the stage on the project page.
Okay, I will try that. Thanks!
googlebackward
Scratcher
8 posts

How to make a love/fave detector

Why don't you just add a like button and a favorite button in your game. Do the buttons in scratch matter at all?
googlebackward
Scratcher
8 posts

How to make a love/fave detector

whenclickedforeverswitchcostumetolike costumegotox:anywhereyou'dlikeinthewindowy:anywhereyou'dlikeinthewindowiftouching mouse pointer ?andmousedown?thenchange like count by1
and just copy this for the favorite button

Last edited by googlebackward (March 18, 2025 14:55:03)

googlebackward
Scratcher
8 posts

How to make a love/fave detector

Here is the game I got it from https://scratch.mit.edu/projects/1116431088/ I made this game

Last edited by googlebackward (March 18, 2025 00:09:00)

Dakota_The_Coder
Scratcher
69 posts

How to make a love/fave detector

googlebackward wrote:

Here is the game I got it from https://scratch.mit.edu/projects/1116431088/ I made this game
The “mouse down” block only works inside the project window.
temsterriblegames
Scratcher
500+ posts

How to make a love/fave detector

you cant detect when someone actually likes/favourites, but the methods above are the closest you can get
googlebackward
Scratcher
8 posts

How to make a love/fave detector

And is that why you posted this at 5:00 a.m. My time?
googlebackward
Scratcher
8 posts

How to make a love/fave detector

Also I meant why don't you just make your own button in your game instead of using the scratch buttons.
googlebackward
Scratcher
8 posts

How to make a love/fave detector

whenclickedforeverscratchon!
googlebackward
Scratcher
8 posts

How to make a love/fave detector

googlebackward wrote:

whenclickedforeverswitchcostumetolike costumegotox:anywhereyou'dlikey:anywhereyou'dlikeiftouching mouse pointer ?andmousedown?thenchange like count by1
and just copy this for the favorite button
this only works in the window so make the buttons in game
googlebackward
Scratcher
8 posts

How to make a love/fave detector

Or maybe play my game and you'll figure out what I mean.
Hapyprson
New Scratcher
1 post

How to make a love/fave detector

whenclickedforeverswitchcostumetolike costumeiftouchingmousedown?andtouchingmouse pointer??theniffave=1thensetfaveto0elsesetfaveto1waituntilnotmousedown?
This prevents Like then Unliking.

Last edited by Hapyprson (May 6, 2025 20:56:49)

swyr55
Scratcher
3 posts

How to make a love/fave detector

or use this:
faved?liked?
kidding, those arn't real

Powered by DjangoBB