Discuss Scratch

MineralNooodles6664
Scratcher
100+ posts

How do I make it so that I detect if Someone hearts or stars My project?

In one of my project, I wanted to give The player 10 extra score if He/She Favorites/stars Or loves/hearts My project Because I saw someone do that in their project. Please help. Thanks

when green flag clicked
when I receive [ help]
[/Thank You!] for (2) secs

Last edited by MineralNooodles6664 (Oct. 17, 2020 05:22:12)

1O1Andrew
Scratcher
100+ posts

How do I make it so that I detect if Someone hearts or stars My project?

You cant. You can detect if there mouse goes to the position of heart and favorite, but not if you heart and favorite
MineralNooodles6664
Scratcher
100+ posts

How do I make it so that I detect if Someone hearts or stars My project?

1O1Andrew wrote:

You cant. You can detect if there mouse goes to the position of heart and favorite, but not if you heart and favorite
But Someone did In this Project (You get 10 extra coins if you heart and fav) https://scratch.mit.edu/projects/432493497/

Last edited by MineralNooodles6664 (Oct. 17, 2020 05:53:52)

mysterious-neutron
Scratcher
1000+ posts

How do I make it so that I detect if Someone hearts or stars My project?

Try editing the code of this by replacing the touching mouse pointer with touching mouse pointer and mouse down

Last edited by mysterious-neutron (Oct. 17, 2020 05:58:37)

MineralNooodles6664
Scratcher
100+ posts

How do I make it so that I detect if Someone hearts or stars My project?

mysterious-neutron wrote:

Try editing the code of this by replacing the touching mouse pointer with touching mouse pointer and mouse down
Sorry I am new to scratch and didn't get that. Can you please explain in detail? Thx
OtherAsriel
Scratcher
100+ posts

How do I make it so that I detect if Someone hearts or stars My project?

MineralNooodles6664 wrote:

mysterious-neutron wrote:

Try editing the code of this by replacing the touching mouse pointer with touching mouse pointer and mouse down
Sorry I am new to scratch and didn't get that. Can you please explain in detail? Thx
Like this.
forever
if mouse x and mouse y = x positions and y positions of heart and favorite
if mouse down
if touching color of heart or favorite
change mouse click by 1
set you hearted and favorited to 1
wait until mouse down
or you can use a and block
anyway this doesn't work for when they unfavorite your game and unheart it
OtherAsriel
Scratcher
100+ posts

How do I make it so that I detect if Someone hearts or stars My project?

MineralNooodles6664 wrote:

mysterious-neutron wrote:

Try editing the code of this by replacing the touching mouse pointer with touching mouse pointer and mouse down
Sorry I am new to scratch and didn't get that. Can you please explain in detail? Thx
Actually my thing doesn't work
imfh
Scratcher
1000+ posts

How do I make it so that I detect if Someone hearts or stars My project?

If you put a sprite underneath the love/favorite buttons, the “touching mouse pointer” block will tell you if the player is touching the sprite, and thus the buttons. However, you cannot detect if the player actually clicks the buttons since the mouse down block doesn't work outside of the stage.

To get a sprite underneath the buttons, first make a sprite about their size. Next, make a really big costume (eg. fill a bitmap costume with color). The bigger a sprite is, the further it can go off the screen.

To put the sprite under the buttons, first switch to the really big costume. Next set the coordinates to what you want. You'll have to play around with it to find the right spot. Next, switch to the smaller costume. Check if it works using something like the below:

forever
say <touching [mouse-pointer v] ?>
end

Once you have it in the right spot, you should be able to just leave it there. Something like this will detect if the player hovers over the buttons for a bit (which is probably what the project you saw does):

when green flag clicked
forever
wait until <touching [mouse-pointer v] ?>
wait (2) secs
if <touching [mouse-pointer v] ?> then // Check if still touching
broadcast [Loved/Favorited! v]
stop [this script v]
end
end
Warrior_Cat_13
Scratcher
1 post

How do I make it so that I detect if Someone hearts or stars My project?

Thank you!
White_Rice-
Scratcher
10 posts

How do I make it so that I detect if Someone hearts or stars My project?

Sadly you can't detect it.




__________________________________________________________________________________


White_Rice- 11/21/2020
moigam
Scratcher
1000+ posts

How do I make it so that I detect if Someone hearts or stars My project?

White_Rice- wrote:

Sadly you can't detect it.




__________________________________________________________________________________


White_Rice- 11/21/2020
That's not true. Now even read the chain!
1O1Andrew
Scratcher
100+ posts

How do I make it so that I detect if Someone hearts or stars My project?

moigam wrote:

White_Rice- wrote:

Sadly you can't detect it.




__________________________________________________________________________________


White_Rice- 11/21/2020
That's not true. Now even read the chain!
They just said you cant detect clicks outside of the stage
MineralNooodles6664
Scratcher
100+ posts

How do I make it so that I detect if Someone hearts or stars My project?

Bump
imfh
Scratcher
1000+ posts

How do I make it so that I detect if Someone hearts or stars My project?

MineralNooodles6664 wrote:

Bump
What do you still need help with that wasn't answered above? I gave a script which should work like you want.
MineralNooodles6664
Scratcher
100+ posts

How do I make it so that I detect if Someone hearts or stars My project?

imfh wrote:

MineralNooodles6664 wrote:

Bump
What do you still need help with that wasn't answered above? I gave a script which should work like you want.

Sorry I actually want to detect if the player clicks it, thanks for helping though
Nezon
Scratcher
1000+ posts

How do I make it so that I detect if Someone hearts or stars My project?

MineralNooodles6664 wrote:

imfh wrote:

MineralNooodles6664 wrote:

Bump
What do you still need help with that wasn't answered above? I gave a script which should work like you want.

Sorry I actually want to detect if the player clicks it, thanks for helping though
Sorry, but it's impossible. You can never detect if a player actually clicks it. Players can always bypass the detector.
TheAmazingDog1234
Scratcher
41 posts

How do I make it so that I detect if Someone hearts or stars My project?

when green flag clicked
forever
if < [ star] pressed?> then
change [ star] by (1)


Last edited by TheAmazingDog1234 (Jan. 4, 2021 16:47:45)

1O1Andrew
Scratcher
100+ posts

How do I make it so that I detect if Someone hearts or stars My project?

TheAmazingDog1234 wrote:

when green flag clicked
forever
if < [ star] pressed?> then
change [ star] by (1)


please dont blockspam or necropost.
EpicBrave_YT
Scratcher
73 posts

How do I make it so that I detect if Someone hearts or stars My project?

MineralNooodles6664 wrote:

In one of my project, I wanted to give The player 10 extra score if He/She Favorites/stars Or loves/hearts My project Because I saw someone do that in their project. Please help. Thanks

when green flag clicked
when I receive [ help]
[/Thank You!] for (2) secs


That should be hard…
Sorry, I cannot help
MyUserNameIsFuni
Scratcher
1 post

How do I make it so that I detect if Someone hearts or stars My project?

come on guys i actually need an answer!

Powered by DjangoBB