Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Light effects: Need help! (https://forums.graalonline.com/forums/showthread.php?t=63584)

Raeiphon 01-20-2006 03:51 PM

Light effects: Need help!
 
The most i've done with light effects is the flickering of lanterns and a really basic fading shield. I'm not a whiz at mathematics/operations by any means and I have no idea where to start.

Basically, what I want with this effect is for lights to hover around the player and dance, like fairies of such. I cant, however, think of any mathematical operation that'd loop to a certain value then jump into the minuses so my knowledge can transpose that into a backwards movement.

A lot of help here would be brilliant. I learn best off snippets.

ZeLpH_MyStiK 01-21-2006 03:35 AM

sine? cosine?

Yen 01-21-2006 03:59 AM

Sin(1.57) = 1
Sin(3.14) = 0
Sin(4.61) = -1
Sin(6.28) = 0
Sin(7.85) = 1
Sin(9.42) = 0
Sin(10.99) = -1

See a pattern?


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

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