Thread: Do the lights!
View Single Post
  #3  
Old 03-31-2006, 02:45 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
PHP Code:
function onCreated() {
  if (
params[0] == "wind") {
    
this.la = new[8];
    
this.lz = new[8];
    
this.ls = new[8];
    
this.lm = new[8];
    
this.lr = new[8];
    
this.lu 0;
    
this.ll 0;
  }
  
setTimer(.05);
}
function 
onTimeout() {
  if (
this.lu == 0NewLeaf();
  
this.lu = (this.lu 1) % 6;
  for (
08a++) {
    if (
this.ls[a] > 0) {
      
this.la[a] += this.lm[a];
      
this.lz[a] += this.ls[a];
      
showimg2(a,"leaf1.png",player.sin(this.la[a]) * 1.5,player.cos(this.la[a])*.5player.this.lz[a]);
      
findimg(a).zoom .75;
      
findimg(a).rotation += this.lr[a];
      if (
a%== 0) {
        
findimg(a).image "light2s.png";
        
findimg(a).red findimg(a).blue 0;
        
findimg(a).green 1;
        
findimg(a).alpha .9;
        
findimg(a).zoom .5;
      }
      if (
this.la[ain |1.57,4.71|) findimg(a).layer 0;
      else 
findimg(a).layer 2;

        
      if (
this.lz[a] > 3.5this.ls[a] = 0;
    }
    else 
hideimg(a);
  }
}

function 
NewLeaf() {
  
this.la[this.ll] = random(0,6.28);
  
this.lz[this.ll] = 0;
  
this.ls[this.ll] = random(.03,.1);
  
this.lr[this.ll] = random(0,.5);
  
this.lm[this.ll] = random(.3,.6);
  
this.ll = (this.ll+1) % 8;

Yep.. I have like ~60 ganis with light effects in them..
Reply With Quote