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.

Newcomers DBPro Corner / Sprite transparency

Author
Message
aldoro101
6
Years of Service
User Offline
Joined: 27th Apr 2014
Location:
Posted: 25th Jul 2014 05:42
How would I go about setting the transparency color for sprites? It would help if you could name which commands to use.

Man everybody got aids n' $h1t.
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 25th Jul 2014 07:07 Edited at: 25th Jul 2014 07:39
Hopefully, this commented snippet will help.



Edit:
Quote: "
` not required - creating a sprite or 3D object will set the backdrop automatically
backdrop on"


I take that back, it appears creating a sprite will not set the backdrop.

MrValentine
AGK Backer
9
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 25th Jul 2014 10:04
SET SPRITE ALPHA SprNo, opacity/alpha value 0-255 [0 Invisible, 255 Solid]

WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 25th Jul 2014 21:33
I must admit, I hardly ever use the sprite functions. Creating a 3D object will set the backdrop. Sprite’s will only set the backdrop when rendered. The Set Sprite function will prevent the sprite from setting the backdrop regardless of the backsave flag. Sprite transparency is on by default. If the image format is capable of saving with an alpha channel you must create the image with alpha transparency to work. If the image format does not support an alpha channel, then black will be the transparent color, unless you set it to a different color with Set Image Colorkey. So, if you’re using a bitmap image and want black to be transparent, it’s as simple as this-



Login to post a reply

Server time is: 2020-12-02 19:20:43
Your offset time is: 2020-12-02 19:20:43