ID:157440
 
How would I go about making an icon have less than 255 alpha value at runtime?

I know that rgb(R,G,B,A) CAN work for this with icon Blending, but as far as I know it requires a base color to use.

Is it possible to just take an icon and convert the entire thing to semi-transparency?
Subtract rgb(0,0,0,X) from it.
In response to Garthor
That doesn't appear to be working.
Here's the code I used:
obj

var
tmp
icon/DisplayIcon
icon/TransparentIcon
New()
..()
TransparentIcon=DisplayIcon
TransparentIcon.Blend(rgb(0,0,0,130),ICON_SUBTRACT)


DisplayIcon is the normal, solid icon for the object.

TransparentIcon is supposed to be the semi-transparent one created in obj/New() and referenced later for whenever the transparency effect is used, but TransparentIcon is still completely solid.
In response to Gunbuddy13
Nevermind, I fixed it. Had to mess around with the code a bit:
    New()
..()
var/icon/I=new(DisplayIcon)
I.Blend(rgb(0,0,0,130),ICON_SUBTRACT)
TransparentIcon=I
Here's a great article on working with the icon processes (or rather a library that makes them easier to use):
http://www.byond.com/members/ DreamMakers?command=view_post&post=51608