Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Multiply or Divide by sin, cos, or tan?

Author
Message
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 22nd Jul 2011 03:56
I'm just wondering if this is possible like in DBPro? I know the command to multiply and divide, but can you multiply or divide by sin, cos, or tan?
Thanks.


Cheers.

God help me, Please.
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 22nd Jul 2011 06:30
Why was this moved to the DBPro forum? I want to know how to do this for FPSC?


Cheers.

God help me, Please.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 23rd Jul 2011 12:31
Not possible, sorry. Best you can do is simplify the sin/cos curves into an y=ax5+bx4+cx3+dx2+ex+f curve and then perform some crazy script manoeuvre. I've done y=ax2+bx+c with scripts before, so fifth order should be possible, but it won't be pretty!

2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 23rd Jul 2011 22:51
Darn, I was afraid of that. I sure do hope that they add that soon.

Thanks Ched.


Cheers.

God help me, Please.
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 30th Jul 2011 02:39
It's possible. Wouldn't be necessarily workable, but it is possible. What you'd have to do is create a manual lookup table in FPI scripts(dummy object has the script, is activated with the angle you want the sine/cosine/tangent of and it then sets a global variable to that value. Then in your main script you'd use that global variable to divide/multiply/add/subtract to whatever you want.

Quick example:
Dummy Object script:

Calling script:

P.S. This is in no way valid FPI script, and I may have mixed up what I remember of Ply's Mod scripting and the new vanilla global variables system.
P.P.S. Another note, you'd have to devise a way to link the various scripts together in order to get sine or cosine or tangent(have 3 dummy objects with different lookup table scripts[ie one has sine, another cosine,etc.]?).

2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 31st Jul 2011 06:42
Yes, I know I'd have to call it up from another script. I'll just have to do the equation for sin then use that... Why must things always be done the hard way.


Cheers.

God help me, Please.

Login to post a reply

Server time is: 2024-11-24 06:46:15
Your offset time is: 2024-11-24 06:46:15