Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Moving Light effecs. (https://forums.graalonline.com/forums/showthread.php?t=37196)

Torankusu_2002 09-03-2002 02:43 AM

Moving Light effecst.
 
torankusu:
I know there must be math involved, and I don't know what kind, except for maybe sin and cos.

I don't know (haven't learned) them, so if anyone would be willing to help with my learning of how to move light effects, whether it be a document or brief explanations of suggested terms, it would be greatly appreciated.

Thanks.

Torankusu_2002 09-03-2002 02:52 AM

Quote:

Originally posted by Kaimetsu
All you need is showimg and changeimgcolors - the movement then is up to you. You could do:

NPC Code:

if(playerenters) timeout=0.05;
if(timeout){
timeout=0.05;
this.hi++;
showimg 0,light2.png,this.hi,30;
changeimgcolors 0,1,1,1,0.99;
}



Or you could go more complicated and use trigonometry and stuff. There's no simple answer here.

I knew that much, but I was wondering about circles or something similar to it.

Torankusu_2002 09-03-2002 03:02 AM

Quote:

Originally posted by Kaimetsu


Just some simple trigonometry. Given the acute angle of a right-angled triangle and the length of the hypotenuse, can you deduce the other two sides?

p-theorum or something. I forgot it, and I was trying to remember it the other day.

I should of brought home my math book.

prozac424242 09-03-2002 03:36 AM

ya
 
Circles, radius and angles are fun to play with.

Explore, take apart, understand, then make your own
circle, sin/coc/arctan stuff
using scripts i posted here

http://forums.graal2001.com/forums/s...threadid=36172

mesmerising, isn't it?

math is cool .... at least the part i can sort of understand!

Torankusu 09-04-2002 03:32 AM

Quote:

Originally posted by Kaimetsu
post
a^2 * b^2 = c^2 - theorum.
I looked all of that up in my math book. I'll try to do the problems later.

WanDaMan 09-05-2002 05:10 PM

A simple 1
NPC Code:

if (playerenters||timeout){
showimg 1,light2.png,this.x,this.y;
changeimgcolors 1,random(.1,1),random(.1,1),0,.99;
this.x=random(0,60);
this.y=random(0,60);
timeout=0.05;}


i think thats right not sure x.x
Im a newby


All times are GMT +2. The time now is 04:07 PM.

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