Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Looking for yet another code (Game Maker)


Mr.S

Recommended Posts

image_blend is probably what you're looking for. image_blend holds a color value that basically says what percent of the sprite's actual color will be drawn to the screen. A image_blend of c_white (which is 100% R,B,G) will draw the sprite normally. A image_blend of c_black (which is 0% R,B,G) will draw the sprite as a black silhouette of what it should be. A image_blend of (50% all) would be halfway in-between. A image_blend of (0%R,100%B,100%G) would draw the image without its red component, etc.

To fade a color to black, simply set the image_blend to darker and darker greys starting with white and ending with black or a dark grey. [Note: 100% of a color is a value of 255 and 0% is 0]:

create event:
   blend = 255; 
   bc = make_color_rgb(blend,blend,blend); 
   image_blend = bc;

step event:
   blend -= 1
   bc = make_color_rgb(blend,blend,blend); 
   image_blend = bc;
   if(blend < 50)
   {
       //Cycle done
   }

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...