I've searched the forums and haven't been able to find anything that answers the exact problem I'm having.
I need a 2d map that is revealed as the player icon moves. This is in B3D using Sprite Candy.
I load the texture for the mask (i.e. the blacked out part of the map):
texMask=LoadTexture("mytex.bmp",4)
I set up the Sprite Candy objects:
HUD_01%=HUD_Create(camera)
mask_file%=HUD_LoadMemoryResource(texMask,4)
layer_mask%=HUD_CreateLayer(HUD_01,mask_file)
img_mask=HUD_CreateImage(layer_mask,400,300,0,0,1024,1024)
Then I draw a rectangle on the texture like this:
SetBuffer TextureBuffer(texMask)
Color 0,0,0
Rect xpos,ypos,10,10,1
SetBuffer BackBuffer()
It all displays fine.
When I move on the map it draws a black rectangle that I can see on the SC image.
BUT I don't want to see a black rectangle I want a transparent rectangle!
So am I missing some additional command? Or I am not able to do what I want this way? Ideas please - this is one of those little problems that is starting to annoy me :(
I need a 2d map that is revealed as the player icon moves. This is in B3D using Sprite Candy.
I load the texture for the mask (i.e. the blacked out part of the map):
texMask=LoadTexture("mytex.bmp",4)
I set up the Sprite Candy objects:
HUD_01%=HUD_Create(camera)
mask_file%=HUD_LoadMemoryResource(texMask,4)
layer_mask%=HUD_CreateLayer(HUD_01,mask_file)
img_mask=HUD_CreateImage(layer_mask,400,300,0,0,1024,1024)
Then I draw a rectangle on the texture like this:
SetBuffer TextureBuffer(texMask)
Color 0,0,0
Rect xpos,ypos,10,10,1
SetBuffer BackBuffer()
It all displays fine.
When I move on the map it draws a black rectangle that I can see on the SC image.
BUT I don't want to see a black rectangle I want a transparent rectangle!
So am I missing some additional command? Or I am not able to do what I want this way? Ideas please - this is one of those little problems that is starting to annoy me :(