Transparent image.
-
When an image is created in code it appears to be a black box by default is there a way to make it blank not black so the image behind can be seen?
The code below shows what I mean:box(100,100,150,150,red, false) image =createImage(50,50,false,image_rgb) setDrawTarget(image) box(1,1,48,48,white,true) setDrawTarget (frameBuffer) drawImage(image,150,150) update() sleep(2)
This draws a red square with the white outline of a square on top which is filled in black (there is no code to draw the black square). What I want is to be able to see the red of the first square through the second square. I know I could get round this by not using images, but for the game I'm working on it gets a lot more complicated than two squares, this is just to show the principle of how the code works.
-
When you create the image, use "image_rgba" instead.
(This value is currently only documented in the online version of the help.)
-
@Nisse5 thank you that's fixed it. I wondered what the other possible image types were after reading the in game help.