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.

2D All the way! / how to: sprites transparency

Author
Message
Cros Jovil
20
Years of Service
User Offline
Joined: 27th Jan 2004
Location:
Posted: 9th Feb 2004 20:46
how do I get rid of the background of my sprite so that all thw is in the image that is not the character is transperent so as to see the screen background around my sprite
UnderLord
20
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 9th Feb 2004 21:10 Edited at: 9th Feb 2004 21:11
ok this is what you do i just had trouble with this myself

two ways i know of

1 - set image colorkey (the hard way)

2 - take your sprite make his background black and then you could use set sprite colorkey 0,0,0 or use set sprite 1,1,1

but your background of the sprite must be black.

you could also set a flag on the load image "name.bmp",1,1

for my own use i used bot hthe image flag and the set sprite command

The search continues.
Cros Jovil
20
Years of Service
User Offline
Joined: 27th Jan 2004
Location:
Posted: 9th Feb 2004 22:39
thanx a billion
UnderLord
20
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 9th Feb 2004 22:45
sorrie set sprite colorkey is sopost to be set image colorkey

if you are loading alot of sprites you could do a for-next loop for transparency

like

for n= 1 to 200
set sprite n,1,1
next n

i did this in my program and it seems to work fine.

The search continues.

Login to post a reply

Server time is: 2024-05-13 07:03:38
Your offset time is: 2024-05-13 07:03:38