Page 1 of 1
Nyx randomization?
Posted: Wed Dec 10, 2008 10:43 pm
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?
Re: Nyx randomization?
Posted: Wed Dec 10, 2008 10:57 pm
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.
Re: Nyx randomization?
Posted: Wed Dec 10, 2008 11:03 pm
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
Re: Nyx randomization?
Posted: Wed Dec 10, 2008 11:06 pm
by texturedshroom
No; Nyx does not currently support variables as such.
Re: Nyx randomization?
Posted: Wed Dec 10, 2008 11:08 pm
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!