• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Is there a limit for the choose() function? [SOLVED]

S

supamonkey2000

Guest
I am making a Hangman game. Basically, I have a word list that is just a choose() function. If it helps, I'm developing for Windows.

My question is really quite simple: Is there a limit for the amount of arguments in choose()?

I currently have 290ish words. I want to hopefully expand to past 1000. Any help appreciated!
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
There used to be a 16 argument limit on choose, but that has now been removed and you can have as many as you require... however pushing it above 16-20 will have performance implications. My suggestion would be to create a ds_list and add all the words into that, then shuffle the list (there is a function) and pop the list [0] value out as your result (and this is probably more useful for the future too, as you can just keep popping words out the list until it's empty if you require as well as many other things). :)
 
S

supamonkey2000

Guest
There used to be a 16 argument limit on choose, but that has now been removed and you can have as many as you require... however pushing it above 16-20 will have performance implications. My suggestion would be to create a ds_list and add all the words into that, then shuffle the list (there is a function) and pop the list [0] value out as your result (and this is probably more useful for the future too, as you can just keep popping words out the list until it's empty if you require as well as many other things). :)
Thanks for the quick reply! This is exactly what I am looking for :)
 
Top