Sprite Photo Editing

Hello, for a game I am making I need to set a sprite’s photo to the background, so is there any block to be able to change the sprite picture similar to how you can change the background photo in a button but for sprites

Like this but for sprites?
image

Or is there an alternative? I need to be able to get the image of the canvas and have the sprite be in it.

Maybe I just completely missed it, but otherwise can some developers add it? Thanks!

1 Like

Hello,

scrCanvas for get image from canvas.

https://x.thunkable.com/projects/5d70f93f8a62b4079eedaff2/project/properties/designer/

I don’t see a block for setting the sprite image

Hi @actech!

I was asking if I could change a sprite’s image using blocks. I wanted to set my sprite image to my background image but I could not find a block to change a sprite’s image.

Thanks!

Sorry for my incorrect answer, I corrected it. You can’t set an image for a sprite using blocks

I need to be able to get the image of the canvas

You wrote this phrase, which is why I showed you a way to get an image from a canvas, which you can place, for example, on a button or Image

1 Like

Hi, I am new to Thunkable and I have the same question. First of all, I would like to say that I am really liking Thunkable. It is great.

Regarding to mythi’s question I found myself in the same situation. I am trying to make a simple RPG game to test it out. I find myself in the following situation: I create a sprite for my character, another one for a monster and a third one for my weapon. I would like to add say 100 weapons to airtable with their images. The idea is that ocassionally I want to get a new weapon from such a database and replace the attributes in the variables (that I already managed to do) and the sprite corresponding to the weapon with the image of the new weapon (attachment in the airtable, which I already managed to get and replace in a simple Image). Later I would like to do the same for the monster’s sprite with that in a database.

My idea was to simply replace the sprite’s image with that of the image of the corresponding row (variable) in the database but I can’t. Isn’t this a huge drawback? I am really surprised that this feature is not implemented or perhaps there is something that I am doing wrong, so that is why I decided to post it and found this post. Am I supposed to create 100 sprites and only make one visible depending on the weapon? Perhaps I am doing something wrong? what is the best way to make something similar? Also, why can’t images be uploaded inside canvas? it is just “similar” to a static sprite and would somehow solve part of the problem…

Thanks in advance and sorry for the bad English.

2 Likes

I wanted to ask if there’s a way to use an image gallery and set a sprite to that image? In my app, the canvas is hidden on the screen until the user hits a button that gets the data from certain buttons and text inputs. Can you get an image from an image gallery and set it to a sprite?

You can add an image list inside the sprite type’s properties. When your sprite needs to switch the image, you can use the “set {sprite name} image number to {image number}” block or the “next image for {sprite name}” block inside the Looks section.