Discuss Scratch

mazed651
New Scratcher
2 posts

Change Color Effect by 25

Hello,

I am changing the Sprite color using “Change Color Effect by 25” function, and it is working. Next I am using “If then” and “touching color –” function to perform an action based on the changed color. When I used the “Change Color Effect by 25” function it is changing the sprite color but don't know the exact color to use in “touching color –” function.

Example: the initial sprite color is red(for example), and using the “Change Color Effect by 25”, the sprite is changing to “Green” but this green could be any green.

Any help would be appreciated.

Thanks,

Mazed

The_Grits
Scratcher
1000+ posts

Change Color Effect by 25

mazed651 wrote:

Hello,

I am changing the Sprite color using “Change Color Effect by 25” function, and it is working. Next I am using “If then” and “touching color –” function to perform an action based on the changed color. When I used the “Change Color Effect by 25” function it is changing the sprite color but don't know the exact color to use in “touching color –” function.

Example: the initial sprite color is red(for example), and using the “Change Color Effect by 25”, the sprite is changing to “Green” but this green could be any green.

Any help would be appreciated.

Thanks,

Mazed

This would fit better in the ‘Help with Scripts’ forum, I'll ask a mod to move the topic for you.
footsocktoe
Scratcher
1000+ posts

Change Color Effect by 25

You use the eyedropper associated with the touching color block to determine the color.

Run the script (changing it if you have to) so that the sprite is on the stage with the new color. Now touch the “if color =” square of the touching color block and then touch the new color on the stage so that it is now in the “if touching color” block.
BKFighter
Scratcher
1000+ posts

Change Color Effect by 25

The best solution (unless I'm missing some block…) is to do something like this:
whenclickedsetcolor varto0foreversetcolor vartocolorvarmod200200 was the maximum number right? otherwise change it too that....setcoloreffecttocolorvar
So just change the variable color var instead of the effect block.
drmcw
Scratcher
1000+ posts

Change Color Effect by 25

The colour effect block uses HSL colours whereas the touching colour block uses RGB. Why not just use
<t
touchingsprite?
? Although slow it's still quicker than touching colour.
cs161404
Scratcher
18 posts

Change Color Effect by 25

whenclickediftouching?thenchange coloreffectby25
at least this worked for me
cs161404
Scratcher
18 posts

Change Color Effect by 25

whenclickediftheworldendsthensayhoorayfor2secsifiamawesomethenthinki am awesome tooo!for2secs
asivi
Scratcher
1000+ posts

Change Color Effect by 25

mazed651 wrote:

Hello,

I am changing the Sprite color using “Change Color Effect by 25” function, and it is working. Next I am using “If then” and “touching color –” function to perform an action based on the changed color. When I used the “Change Color Effect by 25” function it is changing the sprite color but don't know the exact color to use in “touching color –” function.

Example: the initial sprite color is red(for example), and using the “Change Color Effect by 25”, the sprite is changing to “Green” but this green could be any green.

Any help would be appreciated.

Thanks,

Mazed

Then based in

BKFighter wrote:

The best solution (unless I'm missing some block…) is to do something like this:
whenclickedsetcolor varto0foreversetcolor vartocolorvarmod200200 was the maximum number right? otherwise change it too that....setcoloreffecttocolorvar
So just change the variable color var instead of the effect block.

and

drmcw wrote:

The colour effect block uses HSL colours whereas the touching colour block uses RGB. Why not just use
<t
touchingsprite?
? Although slow it's still quicker than touching colour.

you may to use
iftouchingsprite?andcolorvar=the value associated to an actionthen

Greets.
mazed651
New Scratcher
2 posts

Change Color Effect by 25

Hello drmcw,

worked, thanks much.
cs300929
Scratcher
100+ posts

Change Color Effect by 25

Guys, you've got this all worng. It's quite simple.
whenclickedforeveriftouchingcolor?thencleargraphiceffects
deck26
Scratcher
1000+ posts

Change Color Effect by 25

cs300929 wrote:

Guys, you've got this all worng. It's quite simple.
whenclickedforeveriftouchingcolor?thencleargraphiceffects
I don't think you've understood the question.

Powered by DjangoBB