Discuss Scratch

taco_is_an_idiot
Scratcher
3 posts

Rainbow Pen? I need some help

TACO_IS_AN_IDIOT
HE/HIM or XE/XEM



LINK_TO_MY_PROJECT
hey scratchers, i've made a simple drawing engine in scratch. i am now attempting to create a rainbow effect as a pen preset. i am able to create this effect, but that means it will add that effect to all the colours, which i hate the look of.
cansomeonewhohastackledasimilarproblempleasehelpme?ihavenoideawhatimdoinglol:/thisiswhatihavebasicallydonetocreatethepeneffectwhenIreceiverepeatuntilforeverchangepencolorby10idkwhatsupwithmycodeplzhelp
TheNoisyNoisy
Scratcher
100+ posts

Rainbow Pen? I need some help

ok ima try

Last edited by TheNoisyNoisy (June 13, 2024 02:44:14)

octopuswinslow
Scratcher
1000+ posts

Rainbow Pen? I need some help

whenIreceivesetvariableto1repeatuntilvariable=0changepencolorby10
Set “variable” or whatever you want to call it to 0 each time another button that isn't the rainbow button is clicked.

Hopefully I have understanded what you meant correctly.

Last edited by octopuswinslow (June 13, 2024 02:53:45)

TheNoisyNoisy
Scratcher
100+ posts

Rainbow Pen? I need some help

https://scratch.mit.edu/projects/1036597204/
i also added:
double click the white to erase all
now you cant draw outside the canvas
Sir-Cats-A-Lot
Scratcher
30 posts

Rainbow Pen? I need some help

This is how I'd get out of this conundrum:

Before any of this, I'd set the "color" variable to the old color by using it as the value, as shown here:setpencolortocolor For the rainbow itself, I'd use these blocks somewhere:broadcastStart RainbowbroadcastStop RainbowThen, I'd use these scripts to toggle the rainbow effect:whenIreceiveStart Rainbowsetrainbow?toysetpencolorto0repeatuntilrainbow?=nchangepencolorby10whenIreceiveStop Rainbowsetrainbow?tonsetpencolortocolor

Powered by DjangoBB