Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a clickable button?
- iiTrxpQueen
-
New Scratcher
3 posts
How to make a clickable button?
Hey guys! :3
I'm making a clicking game called ‘A day in the life of a Markiplier Fangirl’ (Or something
) but there's one huuuuuge issue. I don't know how to script something to be clickable. Is it possible for you to show me in blocks? Cheers! x
- iiTrxpQueen
I'm making a clicking game called ‘A day in the life of a Markiplier Fangirl’ (Or something
) but there's one huuuuuge issue. I don't know how to script something to be clickable. Is it possible for you to show me in blocks? Cheers! x- iiTrxpQueen
Last edited by iiTrxpQueen (Dec. 20, 2016 18:59:23)
- JACsterandOlibob
-
Scratcher
1000+ posts
How to make a clickable button?
when this sprite clicked
Is this what you mean?
- XEnCortex
-
Scratcher
19 posts
How to make a clickable button?
forever
if <touching [ mousepointer] ?> then
set [ brightness] effect to (50)
if <mouse down?> then
do stuff
end
else
set [ brightness] effect to (0)
end
end
- JACsterandOlibob
-
Scratcher
1000+ posts
How to make a clickable button?
When can I get cloud variables?When making a new variable click ‘make cloud variable’
(☁ cloud variable)
- theSKA1348714
-
Scratcher
7 posts
How to make a clickable button?
I'm making a dating sim on scratch and I want to make buttons that will activate my character to say different things. I cannot figure out the code for this help pls.
- Acacti123
-
Scratcher
17 posts
How to make a clickable button?
Put a forever loop then put an if statement in it.
The boolean would be touching mousepointer then mousedown
The boolean would be touching mousepointer then mousedown
Last edited by Acacti123 (Feb. 14, 2020 03:49:22)
- Acacti123
-
Scratcher
17 posts
How to make a clickable button?
forever
if <<touching [button v] ?> and <mouse down?>> then
(do stuffs)
end
end
I hope you find this helpful!

_________________________________________________________________________________________________________
CLICK HERE TO FEEL HYDRATED]
Last edited by Acacti123 (Feb. 14, 2020 03:47:50)
- ltarouco
-
Scratcher
1 post
How to make a clickable button?
How to make a clikable button that will work on a cellphone ?
- theSKA1348714
-
Scratcher
7 posts
How to make a clickable button?
I found a different way to do it.
For the button:
For the button:
when this sprite clickedthen for the sprite, you want to activate:
broadcast [ v]
when I receive [ v]
say [] for (2) secs
- JACsterandOlibob
-
Scratcher
1000+ posts
How to make a clickable button?
How to make a clikable button that will work on a cellphone ?Mobile phones use the same script. The ‘when clicked’ would be the same as saying ‘when prodded with a finger’
- mh4641
-
Scratcher
8 posts
How to make a clickable button?
So if you want to make a button or any sprite clickable, you will need to place the following code in the sprite you want to be clickable.
when this sprite clickedThen connect the things you want to happen when it is clicked under the event block like this:
when this sprite clickedYou can replace the
next backdrop
next backdropblock with the code you want to run when the button is clicked.
Last edited by mh4641 (March 24, 2020 03:41:03)
- mh4641
-
Scratcher
8 posts
How to make a clickable button?
When can I get cloud variables?Although this message does not have anything to do with the topic, to get cloud variables, you must:
Have the Scratcher rank on the website.
Once your a Scratcher, make a new variable and make it a cloud variable.
(☁ cloud variable)There you go!
Last edited by mh4641 (March 24, 2020 03:48:03)
- Discussion Forums
- » Help with Scripts
-
» How to make a clickable button?








