How to make the drawing of sprite change colour

how do I make the drawing of the sprite change colour!?

Also where did the blue chatbox to ask questions go in thunkable!?
I normally ask Domhall my questions!

It’s there at it’s own place - bottom right of the page

image

Thanks! :blush:

You can ask @Domhnall questions here too! :joy:

5 Likes

:joy:

2 Likes

hello,

I have tried to make the sprite drawing line change colour but it doesn’t work.

image

The advantage of asking questions here in the community is that you can get answers from anyone, including @domhnallohanlon!

-Mark

2 Likes

Hi there @Robotpro.
Why don’t you try to use the sprite to draw different colors?
I mean that assume you have two sprites in your project.They are red pen and blue pen.
Set the red pen drawing color to red and blue pen drawing color to blue.
When you drag the red pen and it would drawing along with red line.The blue is also.

Change mode width and color for sprite.

изображение

I cannot find the same green blocks and mine dont have the “sprite 1”

1 Like

I’ve built that code, to change the drawing color. A button that changes it to a new drawcolor, that is. But for me the button press makes the canvas disappear in the live test and the responsive web app page.

Post a screenshot of your blocks and if possible, a link to your project.

3 Likes

Here’s the image of the code:

and then the links to the project:
https://x.thunkable.com/copy/d6f2c631d9e8bc4968cddc4d3e513568

For me, when I click on the Red button, it crashes when trying to change the drawing width to 10. I’m not sure why.

As far as I see, all the colors cause a crash. I tried taking the two other pieces of code out of the button press to change that color, and it still causes the crash.


I changed the code, and it still crashed with the color change buttons. Any idea how to make them not crash, but instead change the drawing color for a sprite?

It took me a while to realize what you’ve done wrong.

You’re using an Any Component block to set the Stage properties. And you’re specifying Sprite1 as a stage. But it’s not a stage… it’s a sprite. You need to either refer directly to a sprite or if you for some reason still need to use the Any Component blocks then you need to set Sprite... not set Stage...

Edit: And actually, I don’t think this is possible at all with a sprite. The normal drawing width block is this one:

image

You were trying to force a sprite to have a property (Drawing Width) that it doesn’t normally have. Hence the crash!

2 Likes