Frictional Games Forum (read-only)

Full Version: trig functions?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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...

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.
Cheers again, You've helped me out a few times now.


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