Thread: Online lights
View Single Post
  #6  
Old 05-19-2007, 08:03 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
PHP Code:
//#CLIENTSIDE
if (playerenters||timeout) {
  
this.max=90;
  
setarray this.x,this.max;
  
setarray this.y,this.max;
  
setarray this.movex,this.max;
  
setarray this.movey,this.max;
  
setarray this.active,this.max;
  
setarray this.speed,this.max;
  
setarray this.zoom,this.max;
  
setarray this.color1,this.max;
  
setarray this.color2,this.max;
  
setarray this.color3,this.max;
  for (
this.i=0;this.i<this.max;this.i++) {
    if (
this.active[this.i]=false) {
      
this.movex[this.i]=cos(this.angle);
      
this.movey[this.i]=sin(this.angle);
      
this.x[this.i]=x;
      
this.y[this.i]=y;
      
this.zoom[this.i]=random(.1,1.3);
      
this.color1[this.i]=random(0,1);
      
this.color2[this.i]=random(0,1);
      
this.color3[this.i]=random(0,1);
      
this.speed[this.i]=random(.3,1);
      
this.angle+=random(1,10);
      
this.active[this.i]=true;
    }
    else {
      if (
this.x[this.iin <-6,66> && this.y[this.iin <-6,66>) {
        
showimg this.i,light2.png,this.x[this.i],this.y[this.i];
        
changeimgzoom this.i,this.zoom[this.i];
        
changeimgcolors this.i,this.color1[this.i],this.color2[this.i],this.color3[this.i],.99;
        
this.x[this.i]+=this.movex[this.i]*this.speed[this.i];
        
this.y[this.i]+=this.movey[this.i]*this.speed[this.i];
      }
      else {
        
this.active[this.i]=false;
      }
    }
  }
  if (
this.angle>1000) {
    
this.angle=0;
  }
  
timeout=0.05;

__________________
Reply With Quote