[SOLVED] Scratch card game

Trying to build this simple game… The problem is I cannot treat drawing color to transparent can someone try to replicate or suggest me alternate solution. That is to erase the color

Hi @beatbaba7leb, thanks for reaching out.

There is a current known issue with our canvas where setting the background to transparent is not functioning properly. The issue has been acknowledged by our engineering team but unfortunately, we do not yet have a timeline for fixing the issue.

Hi Matt

This is different issue. I’m asking about draw color being transparent. There is nowhere canvas is becoming transparent …stage is becoming transparent

Unfortunately, there is no transparent drawing color available.

Matt

Sorry I’m first I’m using the canvas how do I capture x and y position of the Sprite user touches.

Also how do I make a text label appear at that position or move that label with the text.

Just adding …

The spirit I’m talking about are created using create block.

But just reading from other post I do have a drawing on.

Yesterday when I tried to get… when spirit touch component XY blocks it even stopped creating spirits.

I’m not in front of PC right now so can’t share.

I’d like the ability to erase my on canvas as well.

1 Like

@beatbaba7leb Do you still need assistance with this? Could you share your blocks if you do so we can help assist?

@matt_conroy I do still need assistance with this, I’m having the same problem as he is, although I have no blocks to share as nothing I try allows me to know where the pointer is, nor can I erase anything with any of the blocks.

I’ve tried a lot of different variations and nothing changes. Do you have some blocks that would get us started?

Each time a click event occurs, you could capture the X and Y position of the sprite through the use of the get X or get Y blocks.
Screenshot 2024-04-16 at 2.26.40 PM

You can also set the label’s X and Y coordinates based on this as well.
Screenshot 2024-04-16 at 2.27.45 PM

Hi Matt

Are the components get X and get Y blocks working I have been told that there is an issue with this blocks

They should be! There is another issue with the canvas blocks:

But this is because of canvas blocks being set when a particular screen loads. They should always be set with the “When canvas loads” block to have behavior that occurs when the canvas component is available. The canvas isn’t loaded when the screen starts which can cause issues or errors.
image - 2024-03-27T142853.386

In the longer term, our engineering team will work to get a fix here so that you can use the when canvas loads block again.

@matt_conroy So then there is not a way to get the location of the pointer?

Hello @overshield
Unfortunately, it seems that Label Canvas blocks don’t have any effect on mobile but they work on Web Preview.
image (1)

We’re committed to finding a resolution quickly, and we will keep you updated as soon as there is any progress.

Hello @beatbaba7leb @overshield @tiny_apps
thank you again for your patience. I would like to let you know that we have officially released a fix for the issue with the canvas blocks.

Please keep in mind that you may need to do a hard refresh of your browser for the changes to take effect in your project. If this issue is present on the Thunkable Live app, you will want to update that through the App Store and/or Google Play Store before any changes will occur. If your downloaded or published app is affected by this bug, you will need to re-download or re-publish your app for these changes to take effect.

What is fixed

X and y position
Transparent drawing color

Or both?

Please let us know if anything else is fixed

Hello @tiny_apps :wave:
The x and y position issue was fixed!
The transparent drawing color is something that we don’t currently support but you could create a Feature Requests about it.
Let me know if you have more questions.

1 Like