specifying values for rnd() in the script

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
dklr
Posts: 40
Joined: Tue Jun 14, 2005 4:18 pm

specifying values for rnd() in the script

Post by dklr »

Is there any way in the script to specify what the random number generator spits out for the waveshapes/colormaps/flowfields that it displays? It would be nice to have control over this so it looks the same every time.

If the answer is no, is this a good idea for a future feature?

User avatar
andy55
Site Admin
Posts: 570
Joined: Sat May 01, 2004 4:38 pm
Contact:

Re: specifying values for rnd() in the script

Post by andy55 »

dklr wrote:Is there any way in the script to specify what the random number generator spits out for the waveshapes/colormaps/flowfields that it displays? It would be nice to have control over this so it looks the same every time.

If the answer is no, is this a good idea for a future feature?
You can... check out srand():

http://www.soundspectrum.com/g-force/Do ... mming.html

For example:

Code: Select all


A2="123"

B8="srand( A2 )"  // Set the random seed

C0="rnd( 1 )"     // C0 will always be the same random sequence
C1="srand( A2 )"  // reset the random seed (the return value isn't used)
C2="rnd( 1 )"     // C2 will be always be the same sequence as C0


Good luck,
Andy

dklr
Posts: 40
Joined: Tue Jun 14, 2005 4:18 pm

Post by dklr »

That's not exactly what I mean. I'm talking about the CTRL X.txt type of script.

User avatar
chkman
Posts: 329
Joined: Mon Aug 08, 2005 12:36 pm
Location: Greensburg, PA

Post by chkman »

I don't think that you can pass any parameters to a config from a script other than those listed in the documentation, i.e. morph time etc.

You could copy each wave/flow etc to a new name enclosed in parenthesis (so G-Force ignores them in slideshow mode), and put the seed value in or just change the random numbers to a fixed number, as in the example change C0="rnd( 1 )" to C0=".75";

Post Reply