How do you make an art pad?


#1

Can someone please tell me how I can make an art pad while making sense to a new coder.


#2

That’s the hard part XD

Well, if I were you, I would get a little bit familiar with Hopscotch first, but if you really want to know…

You’re gonna have an object that you will tap to get a certain color. When you tap it, it will set a variable to a certain number. Then, in your object that is drawing when you press the screen, it will set trail color to that color when the variable equals the certain number…you know what, just look at this because I’m bad at explaining code to new people:

I would highly suggest look at other projects in the starter project tab


#3

What kind of art pad are you making? Changing width? Are you using HSB colors?

And do you know how to use values?

I’m just seeing how I should explain it :P


#4

Take a look at these topics for great tutorials:



#5

I used a similar format to this when I was a beginner, it’s fairly easy to do, it just takes time to put in the colors! You can look in the code if you’d like, I can answer any questions you may have and help explain what you don’t understand or need help with. It’s fairly simple; and feel free to use this code if you want to make your own drawing pad! :blush:
https://c.gethopscotch.com/p/z8nmz0x52


#6

That’s the problem the variables, I know how to get the colors but how do u get it to draw?


#7

What do you have so far, I may be able to help you.

In terms of the drawing, you’d use an invisible block following the position of your finger (last touch x, last touch y)
And when you press a color, it’d change the value of a number, which represents the color being used,

With your drawing shape, when the value changes, the code would change its trail color.

The same thing happens with the width, it’s just a value based on the width chosen