Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Sprite Colour

Author
Message
Nathan89
16
Years of Service
User Offline
Joined: 9th Apr 2008
Location:
Posted: 10th Apr 2008 00:27
Hey Guys ,

I was wondering if someone could help me i am new to GDK , could someone please tell me how to delete the colour around the sprite and does it have to be a certain colour???

Thanks
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 10th Apr 2008 09:59 Edited at: 10th Apr 2008 10:02
The default transparency color is black RGB(0,0,0).

The overall transparency (alpha) of the visible sprite itself can be set using:

dbSetSpriteAlpha(int SpriteNumber,int AlphaValue )

where alpha is between 0 and 255 with 0 being invisible and 255 solid.

No matter how good your code is, someone will improve on it
Nathan89
16
Years of Service
User Offline
Joined: 9th Apr 2008
Location:
Posted: 10th Apr 2008 13:32
Thank you , unfortenly i found out how to do it not long ago , i just need to find out how to animate them now hehe but ill be asking that in another thread unless anyones got any advice for me #????
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 10th Apr 2008 16:45
You might take a look at the dbSetSprite(int ID, int backsave, int transparent) function to make sure that you're sprite is handling transparency.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Petr
16
Years of Service
User Offline
Joined: 1st May 2008
Location:
Posted: 1st May 2008 10:43
Hi,

I need some help here.

I need a sprite that is solid and that I can control its alpha but I am only getting one of the two:

Alpha works but black color is see through:
dbSetSprite(1, 1, 1);
dbSetSpriteAlpha(1, 128);

Black is not solid but alpha does not work:
dbSetSprite(1, 1, 0);
dbSetSpriteAlpha(1, 128);

Thanks.

Login to post a reply

Server time is: 2024-11-20 07:32:43
Your offset time is: 2024-11-20 07:32:43