Thread: Script?
View Single Post
  #6  
Old 03-21-2002, 11:45 AM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Re: Script?

Quote:
Originally posted by thrashsoul
What is the Script for the light going in circles
Its very easy... but u need to know some maths..

1st) Sinus u will use for X
2nd) Cosinus u will use for y

timeout=.05;
this.a=(this.a+.1)%6.2;
showimg 1,light2.png,x+4*sin(this.a),y+4*cos(this.a);
changeimgcolor 1,1,1,1,0.8;

It should work...

Ps. Sinus of a number is something that will becoming big and so it slows...
3.14 is when it change the signal..

"%6.2" U dont need to use this, but so the "this.a" number never will stop.
This way it will back to "0" when "this.a" be equal 6.2(3.14*2 or 360o)

"4*" is the ray of the circle...

I understood now how they made that effects in the start ghost level on Graal2k2, its easy too...
Reply With Quote