Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Fancy twirling lights (https://forums.graalonline.com/forums/showthread.php?t=40193)

Zigidias 11-11-2002 09:19 AM

Fancy twirling lights
 
Well, I was wondering... How do you make those fancy twirling lights. I'm not asking for a full script, just a tip on how to make them twirl in those circles and fancy lines how they do on some servers.

Zigidias 11-11-2002 09:26 AM

I thought it was something with arrays, I am not great with trig, can you give me an example, I am halfway done with algebraII right now

Falcor 11-11-2002 09:29 AM

algebra II includes advanced Trig in my curriculum. O.o, Learn about Radians and Sin, Cos, Tan, and their inverses.. It will do you some good to know them.

Zigidias 11-11-2002 09:31 AM

Quote:

Originally posted by Falcor
algebra II include advanced Trig in my curriculum. O.o, Learn about Radians and Sin, Cos, Tan, and their inverses.. It will do you some good to know them.
Ok, thanx, mayb i can get my hands on a full working script from someone later. I can learn from looking at stuff pretty easy.

Dach 11-11-2002 10:09 AM

try this script to see what each function does

NPC Code:

while (1==1) {
i+=.1;
showpoly 0,{x,y,x+sin(i),y};
message #v(i);
sleep .05;
}



It should give you a good idea of how they work.

Zigidias 11-11-2002 10:15 AM

Quote:

Originally posted by Dach
try this script to see what each function does

NPC Code:

while (1==1) {
i+=.1;
showpoly 0,{x,y,x+sin(i),y};
message #v(i);
sleep .05;
}



It should give you a good idea of how they work.

Wow, It took a second to get but I think I understand. Thanx, I still dont understand sin all the way but I will expiriement with this.

Thanx

osrs 11-11-2002 10:30 PM

NPC Code:

PI=3.14;
while (1==1) { i+=0.1;
showpoly 0,{x,y,x+sin(i)*PI,y+cos(i)*PI};
sleep .05;
}



try this script,maybe would help...
Someone posted a site with things about trigonometry, search for it. =)

Zigidias 11-12-2002 08:26 AM

OMG osrs, that is exactly what i needed, thank you very much :D

Python523 11-14-2002 11:00 AM

Quote:

Originally posted by osrs
NPC Code:

PI=3.14;
while (1==1) { i+=0.1;
showpoly 0,{x,y,x+sin(i)*PI,y+cos(i)*PI};
sleep .05;
}



try this script,maybe would help...
Someone posted a site with things about trigonometry, search for it. =)

why bother using pi as a radius...pi is usually the radian


All times are GMT +2. The time now is 02:30 PM.

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