SkyLights Posted November 20, 2007 Report Share Posted November 20, 2007 So basically, I am looking to take this particular tileset... And throw an alpha value onto it (0.3) and lay it onto a pyramid. The help file is confusing the crap out of me though with these methods. background_replace_alpha(ind,fname,preload) Same as [background_replace] but in this case the file has an alpha channel. background_set_alpha_from_background(ind,back) Changes the alpha (transparancy) values in the background with index ind using the intensity values in the background back. This cannot be undone. So far, I tried just doing background_set_alpha_from_background(bgAlpha, 0.3), but that produced a very weird result: Help plz Link to comment Share on other sites More sharing options...
Kain Posted November 20, 2007 Report Share Posted November 20, 2007 Nono, background_set_alpha_from_background sets the alpha from an alpha image (in this case a background). What you should do is make a gray background of color 77 = 0.3 * 255 the size of your tile and then use background_set_alpha_from_background( bgColor, bgAlpha); where bgColor is the background you have and bgAlpha is the gray alpha sprite. Note that you can do this at the very beginning of the game and then delete the alpha sprite to save memory. I also think GM 7 has the ability to load alpha from a .png with transparency, that's what the background_replace/add_alpha functions are, I believe. 1 Link to comment Share on other sites More sharing options...
Serephim Posted November 20, 2007 Report Share Posted November 20, 2007 Thats an awesome level, Skylights. Link to comment Share on other sites More sharing options...
SkyLights Posted November 20, 2007 Author Report Share Posted November 20, 2007 Got it, thanks. Link to comment Share on other sites More sharing options...
Kain Posted November 21, 2007 Report Share Posted November 21, 2007 No problem. As sereph said, awesome level. Link to comment Share on other sites More sharing options...
Recommended Posts