Nyx randomization?

Post all technical issues and questions here. We'll gladly help you wherever we can.
Post Reply
omssx
Explorer At Heart
Explorer At Heart
Posts: 177
Joined: Sat Dec 02, 2006 9:08 pm

Nyx randomization?

Post by omssx »

Hi folks, working with nyx for the first time and im making a multiple route tease. to make that happen i need to either select a random page using the button/delay event or to create a variable that then becomes the page name eg:

Var page = rand(1-5)

goto page

Im just not sure of the nyx syntax for this?

I have had a little look in the nyx coding thread but couldnt find the answer in there.

Can anyone help?
User avatar
texturedshroom
Taste the shroom
Taste the shroom
Posts: 422
Joined: Mon Aug 18, 2008 10:19 am
Location: Midwest USA
Contact:

Re: Nyx randomization?

Post by texturedshroom »

Specify the page # as range(1, 5).

As in:

delay(30sec, range(1, 5))

Keep in mind the pages have to be named 1#, 2#, 3#, 4#, and 5# for this to work.
omssx
Explorer At Heart
Explorer At Heart
Posts: 177
Joined: Sat Dec 02, 2006 9:08 pm

Re: Nyx randomization?

Post by omssx »

Ah i see, is it not possible to add the random number to a string with a variable:

var $page = "page"
var $random = range(1, 5)
var $page = "$page$random#"

So i end up with $page is "page3#"

If not ill go with the plain old numbered option, but itd be handy to categorized the groups of pages
User avatar
texturedshroom
Taste the shroom
Taste the shroom
Posts: 422
Joined: Mon Aug 18, 2008 10:19 am
Location: Midwest USA
Contact:

Re: Nyx randomization?

Post by texturedshroom »

No; Nyx does not currently support variables as such.
omssx
Explorer At Heart
Explorer At Heart
Posts: 177
Joined: Sat Dec 02, 2006 9:08 pm

Re: Nyx randomization?

Post by omssx »

Ah okies, thanks for the response anyhoo, i can get to work now!

Theres my suggestion for nyx, variables!

Might not be easy to implement though!
Post Reply