View Single Post
  #14  
Old 01-29-2008, 03:25 AM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
I made one with transitional effects a long while back. You're all free to use it. You set the player's attribute to like
type min max
ex
2 0 1 would make the value go back and forth between 0 and 1 (since mode 2 is back and forth mode). It covered all the good effects

Put this in a gani script and make a player attribute the gani
ie player.attr[15]="whatever.gani";

PHP Code:
SCRIPT
function onPlayerEnters() {
  
this.= new[31];
  
this.= new[31];
  for(
i: {21,22,23,24,25,26,27}) {
     
this.n[i] = 1;
     
this.c[i] = 0;
  }
  
this.= {"red","green","blue","alpha","zoom","rotation","mode"};
  
onTimeout();
}

function 
onTimeout() {
  for(
i: {21,22,23,24,25,26,27}) {
     
temp.player.attr[i].tokenize();
     switch(
temp.t[0]) {
       case 
"0"//solid value
         
player.(@this.s[i-21]) = temp.t[1];
       break;
       case 
"1"//random
         
this.c[i] += .05;
         if(
this.c[i] >= temp.t[3]) {
           
this.c[i] = 0;
           
player.(@this.s[i-21]) = random(temp.t[1],temp.t[2]);
         }
       break;
       case 
"2"//back and forth range
         
this.c[i] += .05;
         if(
this.c[i] >= temp.t[3]) {
           
this.c[i] = 0;
           
player.(@this.s[i-21]) += temp.t[4] * this.n[i];
           if(
player.(@this.s[i-21]) <= temp.t[1]) {
             
player.(@this.s[i-21]) = temp.t[1];
             
this.n[i] = 1;
           }
           if(
player.(@this.s[i-21]) >= temp.t[2]) {
             
player.(@this.s[i-21]) = temp.t[2];
             
this.n[i] = -1;
           }
         }
       break;
       case 
"3"//constant loop
         
this.c[i] += .05;
         if(
this.c[i] >= temp.t[3]) {
           
this.c[i] = 0;
           
player.(@this.s[i-21]) += temp.t[4];
           if(
player.(@this.s[i-21]) <= temp.t[1]) {
             
player.(@this.s[i-21]) = temp.t[2];
           }
           if(
player.(@this.s[i-21]) >= temp.t[2]) {
             
player.(@this.s[i-21]) = temp.t[1];
           }
         }
       break;
     }
  }
  
setTimer(.05);
}
SCRIPTEND 
__________________
Reply With Quote