Thread: Image Masking?
View Single Post
  #3  
Old 02-12-2015, 05:04 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
One of the versions Dusty has used made. Kind of equals to this one of him



PHP Code:
//#CLIENTSIDE
function onPlayerenters() {
  for (
temp.i=0;i<33*33;i++) {
    
showimg(1000+i,"light2.png",((i%32)*2)-4,(int(i/32)*2)-4);
    
/*showpoly(1000+i,{
      ((i%32)*2),(int(i/32)*2),
      ((i%32)*2)+2,(int(i/32)*2),
      ((i%32)*2)+2,(int(i/32)*2)+2,
      ((i%32)*2),(int(i/32)*2)+2
    });*/
    
changeimgmode(1000+i,2);
    
changeimgzoom(1000+i,2);
    
changeimgcolors(1000+i,.99,.99,.99,.99);
  }
  
onTimeout();
}
function 
onTimeout() {
  
temp.lgts = new[0];
  for (
temp.i=0;i<33*33;i++) findimg(1000+i).alpha .99;
  
temp.mx int((mousex-1-5)/2);
  
temp.my int((mousey-1-5)/2);
  
lgts.add({mx,my,6});
  for (
temp.pl:players) {
    if (
pl.account == player.account) {
      
temp.mx int((pl.x+.5-9)/2);
      
temp.my int((pl.y+1-9)/2);
      
lgts.add({mx,my,10});
    } else {
      
temp.mx int((pl.x+.5-5)/2);
      
temp.my int((pl.y+1-5)/2);
      
lgts.add({mx,my,6});
    }
  }
  for (
temp.j:lgts) {
    for (
temp.i=0;i<j[2]^2;i++) {
      
temp.dx = (j[0]+(i%j[2])) - (j[0]+(j[2]/2));
      
temp.dy = (j[1]+int(i/j[2])) - (j[1]+(j[2]/2));
      
temp.dist = (dx^dy^2)^.5;
      
temp.img 1000+(j[0]+(i%j[2]))+((j[1]+int(i/j[2]))*32);
      
//findimg(img).alpha = 0;
      //findimg(img).alpha -= (1-(dist/(j[2]/2)));
      
findimg(img).alpha dist/(j[2]*5);
      if (
findimg(img).alpha .99findimg(img).alpha .99;
    }
  }
  
setTimer(0.05);

__________________
MEEP!
Reply With Quote