Advertisement
ShaunJS

Fade Transition

Jan 2nd, 2019
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //draw the image to be transitioned to
  2. draw_sprite(sImage2,0,0,0);
  3.  
  4. //draw the previous image with decreasing alpha
  5. if (alpha >= 0)
  6. {
  7.     draw_set_alpha(alpha);
  8.     draw_sprite(sImage1,0,0,0);
  9.     draw_set_alpha(1.0);
  10.     alpha -= 0.01 //change this value to adjust speed of transition.
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement