Thread: Light Effects
View Single Post
  #1  
Old 01-23-2008, 06:21 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Light Effects

Well, a lot of LATs ask me for light effect scripts for their levels, and I was told to start making my scripts more public so here's my first code gallery post:

Colorful windmill, probably my favorite light effect:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.maxlights 30;
  
onTimeout();
  
this.0.05;
}
function 
onTimeout() {
  
this.= (this.0.05) - int((this.0.05) / 3) * 3;
  for(
temp.this.ttemp.this.maxlightstemp.++) {
    
showimg(500 temp.i"light3.png"sin(temp.temp.i) * (temp.5), cos(temp.temp.i) * (temp.5));
    
changeimgvis(500 temp.i0);
    
changeimgzoom(500 temp.i0.5 + (temp.90));
    
changeimgcolors(500 temp.icos(temp.temp.i), abs(cos(temp.28.8 temp.i:280)), abs(sin(temp.temp.i)), 0.5);
  }
  
setTimer(.05);

and someone asked for an "infinity" sign..

PHP Code:
//#CLIENTSIDE
function onCreated() {
  for(
temp.0temp.<= 50temp.++) {
    
showimg(200 temp.b"light3.png"sin(temp.b) * 10arctan(sin(temp.b) * cos(temp.b)) * 10);
    
changeimgvis(200 temp.b3);
    
changeimgcolors(200 temp.b,  (0.16 + ((this.this.y) ^ 1.5) / 1000) / 1.70.250.16 + ((this.this.y) ^ 1.5) / 10000.9);
  }


And an X-Box sign (for lulz):
PHP Code:
function onCreated() {
  for(
temp.0temp.402temp.<= 50temp.++, temp.--) {
    
showimg(200 temp.b"light3.png"sin(temp.b) * 3arctan(sin(temp.b) / cos(temp.c)) * 3);
    
changeimgvis(200 temp.b3);
    
changeimgcolors(200 temp.b,  0.20.250.10.5);
  }

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote