Advertisement
degualt

Dynamic shadow system

Jun 8th, 2019
985
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ///Shadow
  2. var max_length=96;
  3.  
  4. for (var i=0; i<max_length; i++)
  5. {
  6.   var ly=y+lengthdir_y(i,270);
  7.   if (collision_point(x,ly,obj_wall,true,true))
  8.     break;
  9. }
  10. shadow_size=(max_length/i)/4;
  11. if (i<64)
  12. {
  13. draw_sprite_ext(sprite_index,image_index,x,ly-2,
  14. shadow_size*image_xscale,-shadow_size/4,0,c_black,0.4)
  15. }
  16. draw_self();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement