Frictional Games Forum (read-only)
trig functions? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: trig functions? (/thread-10592.html)



trig functions? - DRedshot - 10-04-2011

Can I use trig functions in HPS? I've tried a few different ways of writing it but all have so far failed.
I don't have a specific idea yet, but they could come in use when trying to make the player go dizzy and start shaking his head, or to make lights oscillate between multiple different colours
(these are poor examples i know Smile, I could probably come up with better ones with a bit of time).

So far I have tried:

Sin(30.0f)
sin(30.0f)
Sine(30.0f)
sine(30.0f)

Is there a way? I could make a few cool effects if it's possible, but so far I've had no luck...




RE: trig functions? - Tanshaydar - 10-04-2011

Well, normally you need to import math library, but I didn't look into how to's in AngelScript, current documentation pretty much takes care of everything for me.


RE: trig functions? - Your Computer - 10-05-2011

http://www.frictionalgames.com/forum/thread-8711-post-91570.html#pid91570


RE: trig functions? - DRedshot - 10-05-2011

Cheers again, You've helped me out a few times now.


Also, credit to Apjjm for actually taking the time to write that up!