Palette Help

When I change my palette then click play, it doesn’t work. Why? Can someone fix it?

1 Like

It seems to work for me. What’s happening to you?

Did you go to palette, chose one, click done, and then go to play and start drawing?

Yup. The palette was changed.

Can you show a gif?

@jwunderl figured it out!
@GameGod here is it:

1 Like

Can you share the code? I know it is the same, maybe a new project will fix it.

You have an impressive use of extensions here. Did you make them yourself?

No. Does the game work for you?

Here:


Sorry for replying late.

It’s okay!

For some reason, it still doesn’t work for me. Is it a glitch?

1 Like

Does anyone know why this might be happening? I want to add to my game, but it is not working. How does it work for others?

Actually, the problem is that the courser doesn’t show. I tried fixing it, but it doesn’t work.

Oh, I think you have a “set invisible” flag turned on for the pen sprite!

image

If you set invisible to false inside the code where you handle the “Play” menu option selection, it should show up on your canvas.

Yes! Such a simple mistake! Thanks! :grin:

Now all I have to do is make the custom palette, save settings, and line drawing!

Art made with new color palettes:
image
Cooking

3 Likes

Among us
Screen Shot 2020-10-31 at 3.40.10 PM

2 Likes

How are you supposed to make new colour palettes?

I haven’t coded that yet.

If you want to add custom palettes, heres a few pointers! I still haven’t come up with a fantastic design for authoring palettes in blocks that doesn’t require adding a new editor :frowning:

https://github.com/jwunderl/pxt-color/blob/master/palettes.ts#L12 is where I defined the palettes included in the extension. They use a hex literal string, which is sort of like imgs in arcade, except it creates a buffer of numbers. This is the easiest way to add palettes, if you know which ones you want - you can even make an extension of your own that just contains a file like that one and has a dependency on my color fading extension, and when people load your extension the palettes you make will get added to the drop down (just gotta copy the comments that start with //% and make sure things are in a namespace / exported)

If you want to stay in blocks, you can use the set color 1 to color block. You can put these in an array to keep all 16 colors for the custom palette, and then call set color for each on to apply the palette.

1 Like

That was what I was planning on doing, It makes it easier to store the values in settings.

1 Like