Discuss Scratch

CheesePuffGuy11
Scratcher
69 posts

Clicking one sprite then another

im making a game where different liquids do different things to a person. i want to be able to click the liquid, then click the person and it will have its effect.

when green flag clicked
say [I am your father]
broadcast [NOOOOOOOOOOOOO v]
https://www.memecreator.org/static/images/memes/5564202.jpg
NormalMaker
Scratcher
500+ posts

Clicking one sprite then another

In all of the liquid sprites:
when this sprite clicked
set [selected liquid v] to [liquid name] // The variable should be set to the name of the liquid, not to "liquid name".
In the person sprite:
when this sprite clicked
if <(selected liquid) = [example liquid]> then // Repeat this for however many liquids there are.
liquid effect
end

Wobbly sprite dragging is the best thing to ever exist.
EDGE_X
Scratcher
100+ posts

Clicking one sprite then another

Here this might help:

Liquid Sprites
when I receive [message1 v]::control
wait until <<mouse down?> and <touching [mouse pointer v]?>>::events
set [liquid# v] to [1]//for all liquid sprite make sure you set this to "For This Sprite Only"
set [liquid v] to (liquid#)//for the other liquid sprite it should be set to "For All Sprites"
broadcast [message2 v]::control

Person
when I receive [message2 v]::control
wait until <<mouse down?> and <touching [mouse pointer v]?>>::events
if <(liquid) = [#]> then::events

switch costume to [human liquid v]
else
do nothing::custom

Let me know if you experience problems with this script!

Last edited by EDGE_X (Oct. 15, 2021 20:24:46)


Perfect Cell you are perfect! Be perfect, stay perfect, have a perfect life!
Follow me here!
Helper of Scratch Forums. Most Active in Suggestions, Help with Scripts and Bugs And Glitches




when green flag clicked::control
wait until <<perfect? ::#6362e1> = [true]::operators>::events
be perfect! ::#782fea cap



My Kumquat Protectors{
-.-::#f00
'.'::#f90
o.o::#fc0
._.::#0f0
^.^::#00f
*~*::#d0f}::#999 hat
they protect my signature from evil kumquats!::#e4f166
good to have them!::#a277b1









oh hey you found the secret message in my signature.
do not click this

Well scratch changed the way that youtube videos function directly from Scratch so this trick doesn't work anymore.
CheesePuffGuy11
Scratcher
69 posts

Clicking one sprite then another

alright thanks!

when green flag clicked
say [I am your father]
broadcast [NOOOOOOOOOOOOO v]
https://www.memecreator.org/static/images/memes/5564202.jpg

Powered by DjangoBB