I added “Touch or Left mouse button is down” and a “Cursor is on top of…” conditions so that the player can change colors by selecting them, but they won’t work.
(I only made conditions to change colors to brown and dark red at the moment.)
I can send the project files if anyone wants them.
Thaks for your help
I tried doing that multiple times, i noticed that if you select the color before you paint it works, but it only works for the first color that you select
I think there’s a bug with the Shape Painter. - I click on red and drew a line (in red). The I selected brown, and drew a line. It flip-flopped between red and brown while drawing the line (the image below is of one continuous line):
I added a couple of Trigger one conditions to the colour change events. No difference.
[edit] And I removed the delete and create of the shape painter too. Otherwise it clears out the drawing already done.
So this is going to stuff up your painting program. May I suggest a work around, and have a shape painter for each colour on the palette.
Then, for example, you could use an object variable to record the colour name, on both the shape painter and it’s matching palette image. Keep track of the colour name clicked on the palette, and select the matching shape painter when you draw.
I’ve actually got an idea for possibly a better solution. Let me know if you are interested, and I’ll post.
[edit] Following to the end of @Silver-Streak’s link, it looks like the fix will be in the next release of GDevelop.
I will try this tomorrow, looks like it might work until they fix the bug in the next release!
I would love to see your idea for a better solution! I’m already scratching my head over this project lol
For each of the object in your object group Colors, add an object variable RGBString, and give it the RGB string for that colour. For brown, it will be :
While you’re waiting to use the next release of GDevelop use it like :
You won’t need to add any further code when you add another colour. It means you can add different palettes too - pastels, neon etc. The only thing would be to add the RGB string to the object.