How to use clones to set drawing pad colors



Let me get the code, K


ok. @Petrichor hold ur horses


ok i think we good get this topic in the bin now.


Acually, no Petty.
Not trying to be rude, it’s just I need this.


ok nevermind @Petrichor, hold your horses


If you could, could you snapshot the main code?
Lol it’s to complicated!




Now that I look at it, it’s pretty clonky and could be made better, but it works!


Pk, I did the color thing, so it creates a clone and set a diffrent color. But how do you make the pen thing?
@Petrichor could you help?

  • The clone index is always one
    Also to H, you were the first one to tag me on the forum, Yahoo lol


Just make a text object with the code:
When iPad is tapped {

Go to Finger


When IPad is pressed {

Draw a trail color H(h), s(s), B(b) Width (width)

Go To Finger


Which is basically the “Draw Like A Pen” block thing


Clones for colors are the best way to do it, good job.
Never use individual objects, it’s harder to code and is messy.

I would use when self is tapped, so that the clone being tapped does the code inside.
Here’s what I mean.

In the drawing object, I use the default draw like a pen rule, but with the color replaced. It’s hsb, where each value is an iPad variable. This is very important, since the system for colors I have makes iPad variables here important.

This is just to show you the code of the color object. I interpreted your post to mean that each hue is a separate object, so that’s how this code is set up.

This is the color ability. I made some mistakes here, can you see them? I have the x value as the same for every object, and the hue and saturation values are hard coded. This is bad, since this rule will only work with one group of clones. Can you see a way to make it work with all clones?
Basically, it sets position first. Then, it sets three object variables to the color you want it to represent. They must be object variables, because the global iPad variables for the color will be set to these later. Then it sets its color to the object variables.

This is what you asked for mainly. The main part is the when self is tapped. This means that only the clone tapped will set the variables. So when a clone is tapped, this code is run by that specific clone. It sets the global color its own color.

Here’s the result, if you want to look through the code.

Hope this helps.


I was also going to say that…


This helped very well, I cannot thank you enough!


So @Petrichor, the pastel works great! I tried to add another text for neon, copied and pasted, switched variables, etc. But it keeps on turning blue when any neon is tapped. Why, and is there a way I can fix this?


Do ‘When self is tapped’ set a variable ‘H’ to ‘self clone index’ x 3 or something.


And then S and B stay at 100 because it’s neon


Okay, Let me try that.
Also I really like your projects on Hs




Ok, it kinda works…
The only problem is yello is green, blue is purple, etc.


Ah. Get rid of the x3 then. I was just thinking that you wouldn’t want 360 different objects for every single different colour. It doesn’t particularly matter how you do it though.