Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Light Effects (https://forums.graalonline.com/forums/showthread.php?t=78446)

Tigairius 01-23-2008 06:21 AM

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);
  }



Chompy 01-23-2008 07:25 PM

Nice effects :D

Tigairius 01-23-2008 08:26 PM

Quote:

Originally Posted by Chompy (Post 1371498)
Nice effects :D

Thanks

Rapidwolve24 01-23-2008 08:32 PM

picsplz.

cbk1994 01-23-2008 11:14 PM

Congratulations on your first post in the Code Gallery! :)

Chompy 01-24-2008 04:00 PM

Quote:

Originally Posted by cbkbud (Post 1371542)
Congratulations on your first post in the Code Gallery! :)

Yeah :) I hope you will post more nice scripts :p

Inverness 01-25-2008 01:13 AM

I should learn to use cos() and sin() sometimes :(

cbk1994 01-25-2008 01:39 AM

Quote:

Originally Posted by Inverness (Post 1371767)
I should learn to use cos() and sin() sometimes :(

They're actually pretty simple. I would go for it. Makes many things much simpler.


All times are GMT +2. The time now is 11:29 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.